简体   繁体   English

我在哪里可以在jmeter中传递每个HTTP请求的请求百分比值?

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

I am testing load in jmeter. 我正在测试jmeter中的负载。 Now I have 8-10 page requests to be execute. 现在我有8-10个页面请求要执行。 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 主页应该有30%的请求

  2. details page should have 10% of request 详细信息页面应有请求的10%

.... ....

How can I do this using jmeter ? 我如何使用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: 如果您说在一个线程组中要测试10个页面,并且您有要发送到某些页面的请求百分比,则:

home page 30% details page 10% ... 主页30%详细信息页面10%...

then you may make multiple HTTP Requests to a same page inside a thread group. 那么您可以向一个线程组内的同一页面发出多个HTTP请求。

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. 例如,如果您有两个页面,分别是home和details,并且您希望home的请求占75%,Detail的请求占25%,那么您可以在线程组内向home发出三个HTTP请求,对页面进行一个HTTP请求。

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: 此处介绍了另一个选项:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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