本文介绍了如何忽略JMeter中的登录和注销请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用JMeter测试我们的Web应用程序的性能.登录过程包括一些在测试过程中无法复制的外部依赖项,因此我已编程了备用登录.由于此替代登录请求不是正常工作流程的一部分,因此我希望从JMeter结果中排除该登录请求,因为与其他常规请求相比,响应时间非常长.

I'm trying to test the performance of our webapp with JMeter. The login procedure includes some external dependencies that can't be reproduced during the test, so I've programmed an alternate login. As this alternate login request is not part of the normal workflow I would like to exclude the login request from the JMeter results because the response time is pretty high compared to the other normal requests.

有没有一种方法可以只收集一组请求的结果,而忽略其余的请求?

Is there a way to collect results only for a set of requests, ignoring the rest?

推荐答案

据我所知,没有简单的排除方法.但是,通过更改结构,您可以得到想要的东西.

TO my knowledge, there is not an easy way to exclude. However, by changing your structure, you can get what you want.

侦听器调入所有子级别.因此,如果您将侦听器作为测试计划"的直接子代,则侦听器将捕获所有线程组.如果您有多个线程组,并将侦听器放在线程组A中,它将不会捕获线程组B的结果.同样的方法也适用于简单控制器.

The Listeners tune into all children levels. Thus, if you have the listener as a direct child to the "test plan", all thread groups will be grabbed by the listener. If you have multiple threadgroups, and place the listener in Threadgroup A, it will not capture results from Threadgroup B. The same applies for Simple Controllers also.

我建议采用以下结构:

Test Plan
- Thread Group
---- Simple Controller - Login ONLY
---- Simple Controller - Rest of Script
--------- Listener

这篇关于如何忽略JMeter中的登录和注销请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 00:33