Jmeter-每次测试执行一次采样器 [英] Jmeter - Execute sampler once per test

查看:153
本文介绍了Jmeter-每次测试执行一次采样器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的jmeter中有以下测试计划

I have below test plan in my jmeter

|Test Plan
|-Thread Group
|--HTTP Request 1
|--HTTP Request 2
|--HTTP Request 3

在线程组中,我已设置:

In Thread Group I have setted:

  • 线程数-5
  • 加速时间(以秒为单位)-0
  • 循环计数-1

运行测试时,Jmeter会执行每个请求五次.我正在寻找一种方法在整个测试运行中仅执行一次每个采样器,我知道可以通过将线程数设置为1来达到目标​​,但是在这种情况下,测试执行会非常缓慢,所以我想这样做这是并行方式.

When I run my test Jmeter executes each request five times. I'm looking for way how to execute each sampler only once in whole test run, I know I can achive it by setting Number of Threads to 1, but in that case execution of test will be very slow, so I would like to do this in parallel way.

任何想法我该怎么做?我知道我不能使用仅一次控制器",因为每个请求也会由每个线程执行.

Any ideas how can I do it ? I know I can't use Only Once Controller because each request is also executed by each thread.

推荐答案

另一个选择是使用吞吐量控制器作为每个请求的父项

Another option is use Throughput Controller as the parent of each request

吞吐量控制器允许用户控制执行频率.

Throughput Controller allows the user to control how often it is executed.

选择吞吐量值为1Total executions

执行总数 导致控制器在执行一定次数的执行后停止执行.

Total executions causes the controller to stop executing after a certain number of executions have occurred.

每个请求仅会执行一次

这篇关于Jmeter-每次测试执行一次采样器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆