How to exclude unnecessary requests from JMeter lo

2019-08-16 09:08发布

I am running JMeter 4.0 r1823414.

In my test suite, I have the following structure:

enter image description here

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

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

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?

3条回答
手持菜刀,她持情操
2楼-- · 2019-08-16 09:36

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 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.

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

查看更多
The star\"
3楼-- · 2019-08-16 09:54

This is exact match for Filter Results Tool jmeter plugin

It should also filter queries that are not calls to the application but debug samplers or intermediate calculation samplers as beanshell samplers.

In your case you search for Query:

 jmeter\lib\ext\FilterResults.bat --output-file filteredout.csv --input-file inputfile.jtl --include-label-regex true --include-labels "Query.*"
查看更多
成全新的幸福
4楼-- · 2019-08-16 10:01

If you want to exclude from CSV , then go for Filter Results Tool as per @ser7294900 answer.

But if you only want to exclude in HTML report then :

  • First apply Naming Convention on your Transaction Controllers by right clicking on them and selecting "Apply Naming Convention"

Apply Naming Convention - Second, use menu Help > "Export Transactions for report" and replace this in user.properties

Export Transactions for report

查看更多
登录 后发表回答