如何忽略 JMeter 中的登录和注销请求? [英] How to ignore login and logout requests in JMeter?

查看:18
本文介绍了如何忽略 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 中的登录和注销请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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