简体   繁体   中英

Where can I pass the value of percentage of request on each http request in jmeter?

I am testing load in jmeter. Now I have 8-10 page requests to be execute. But I want to provide percentage/number of request in this page and another page is having difference number of request.

eg.

  1. home page should have 30% of request

  2. details page should have 10% of request

....

How can I do this using jmeter ? Please Advice me.

If you have say 10 pages to be tested inside a single thread group, and you have percentage of requests to be sent to some pages such that:

home page 30% details page 10% ...

then you may make multiple HTTP Requests to a same page inside a thread group.

For example if you have two pages say home and details and you want 75% requests on home and 25% to detail, then you may make three HTTP requests to home and one to details page inside the thread group.

EDIT: May be this structure be suitable for your scenario:

+ Thread Group 
|+ Loop Controller 
|-+ If Controller (Random Value < 90) 
|--+ Sampler1 
|--+ Sampler2 
|--+ ... 
|-+ If Controller (Random Value >= 90) 
|--+ Sampler10 
|--+ ... 

or this

+ Thread group 
|+ Loop Controller 
|-+ Sampler1 
|-+ Sampler2 
|-+ ... 
|-+ Throughput Controller (e.g. 90 per minute) 
+ Thread group 
|+ Loop Controller 
|-+ Sampler10 
|-+ Sampler11 
|-+ ... 
--+ Throughput Controller (e.g. 10 per minute) 

I found these here: here

You can use Throughput Controller with the following setting:

在此处输入图片说明

You may have to check Per User depending on what you need.

Use Summary Report listener to check the percentage.

Another option is described here:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM