Jmeter->如果我使用多个HTTP请求采样器怎么办? [英] Jmeter -> What if I am using multiple HTTP Request Samplers?

查看:134
本文介绍了Jmeter->如果我使用多个HTTP请求采样器怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题如下:

1)我在测试计划中添加了10个HTTP采样器,那么它们可以带来什么不同 网站的负载测试?

1) I have added 10 HTTP Samplers in the Test plan , then what difference can they make on the load testing of the website ?

2)当我们使用jmeter进行负载测试时,如何测量由于负载导致的网站故障,即负载测试下网站的故障参数.

2) When we are using jmeter for load testing how can we measure the failure of the website due to load i.e. the parameters of the failure of a website under load testing.

推荐答案

  1. 如果您有1个采样器,1个线程和1个循环-该线程将执行1个采样器并退出.
  2. 如果您有10个采样器,1个线程和1个循环-该线程将连续执行所有10个采样器并退出.
  3. 如果您有10个采样器,10个线程和1个循环-10个线程中的每个线程将执行10个采样器中的每个采样器(总共执行100次)
  4. 如果您有10个采样器,10个线程和10个循环-10个线程中的每个线程将执行10个采样器中的每一个10次,总共执行1000次.

根据采样器的工作方式以及对服务器的响应速度,可以从1个到10个并发用户中获得.

Depending on what sampler(s) do and how fast server response is you can get from 1 to 10 concurrent users.

如果您需要锤击一个端点,则粘贴粘贴采样器没有任何意义,可以使用

If you need to hammer one endpoint there is no sense in copy-pasting samplers, you can use Loop Controller instead.

要精确控制负载,您需要满足以下条件:

To precisely control the load you need the following:

  • Calculate reasonable ramp-up and iterations numbers (or use a plugin like Ultimate Thread Group, which provides easy way of load test scenario definition)
  • If you're looking for generating a spike, like 1000 simultaneous requests, take a look into Synchronizing Timer
  • If you're trying to simulate something like "100 requests per second" - it would be Constant Throughput Timer
  • To analyze load test report open test results file with one (or several) JMeter's listeners, personally I would go for Aggregate Report. Also see The Load Reports guide for all major performance metrics explained.

这篇关于Jmeter->如果我使用多个HTTP请求采样器怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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