如何在NonGUI模式下从JMeter日志文件中排除不必要的请求 [英] How to exclude unnecessary requests from JMeter log file in NonGUI mode

查看:245
本文介绍了如何在NonGUI模式下从JMeter日志文件中排除不必要的请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行JMeter 4.0 r1823414.

I am running JMeter 4.0 r1823414.

在我的测试套件中,我具有以下结构:

In my test suite, I have the following structure:

当我使用以下命令在非GUI模式下运行此TestPlan时:

When I run this TestPlan in non gui mode with the following command:

.\jmeter -t $testplan -l $testlog -e -o $reportFolder

我得到一个包含所有调试步骤和请求的CSV文件(例如,身份验证).
我只对查询请求感兴趣.
如何才能从CSV文件中排除所有请求,而只在其中保留查询请求?

I get a CSV file with all debug steps and requests (Authentication for example).
I am interested only in Query requests.
How can I exclude all requests from the CSV file and leave only Query requests in there?

推荐答案

我知道我做错了什么. 通过为-l提供文件路径,我为整个测试会话创建了一个侦听器:

I figured out what I did wrong. by providing -l with a file path, I created a listener for the whole test session:

12.2非GUI(批处理)测试运行
在非GUI模式下运行时,-l标志可用于为测试运行创建顶级侦听器.这是测试计划中定义的所有侦听器的补充.如上一节中所述,此侦听器的配置由文件jmeter.properties中的条目控制.

12.2 non-GUI (batch) test runs
When running in non-GUI mode, the -l flag can be used to create a top-level listener for the test run. This is in addition to any Listeners defined in the test plan. The configuration of this listener is controlled by entries in the file jmeter.properties as described in the previous section.

如果我运行jmeter -n -t $testplan,我只会从我指定的侦听器中获取日志

If I run jmeter -n -t $testplan i get just the logs from the listeners I have specified

这篇关于如何在NonGUI模式下从JMeter日志文件中排除不必要的请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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