13724

How to exclude unnecessary requests from JMeter log file in NonGUI mode

Question:

I am running JMeter 4.0 r1823414.

In my test suite, I have the following structure:

<a href="https://i.stack.imgur.com/2kNyN.png" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/2kNyN.png" data-original="https://i.stack.imgur.com/2kNyN.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

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).<br /> I am interested only in Query requests.<br /> How can I exclude all requests from the CSV file and leave only Query requests in there?

Answer1:

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

<blockquote>

<a href="http://jmeter.apache.org/usermanual/listeners.html#batch" rel="nofollow"><strong>12.2 non-GUI (batch) test runs</strong></a><br /> 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.

</blockquote>

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

Answer2:

This is exact match for <a href="https://jmeter-plugins.org/wiki/FilterResultsTool/" rel="nofollow">Filter Results Tool</a> jmeter plugin

<blockquote>

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

</blockquote>

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

Answer3:

If you want to exclude from CSV , then go for <a href="https://jmeter-plugins.org/wiki/FilterResultsTool/" rel="nofollow">Filter Results Tool</a> as per @ser7294900 answer.

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

<ul><li>First apply Naming Convention on your Transaction Controllers by right clicking on them and selecting "Apply Naming Convention"</li> </ul>

<a href="https://i.stack.imgur.com/O5C9J.png" rel="nofollow"><img alt="Apply Naming Convention" class="b-lazy" data-src="https://i.stack.imgur.com/O5C9J.png" data-original="https://i.stack.imgur.com/O5C9J.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a> - Second, use menu Help > "Export Transactions for report" and replace this in user.properties

<a href="https://i.stack.imgur.com/FFQUk.png" rel="nofollow"><img alt="Export Transactions for report" class="b-lazy" data-src="https://i.stack.imgur.com/FFQUk.png" data-original="https://i.stack.imgur.com/FFQUk.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

Recommend

  • Are TemplateObject arrays for tagged template literals weakly referenced by their realm?
  • Documentation of NHibernate events and lifecycle?
  • Google Charts: Get element from selected bar in histogram
  • C++: constant reference to temporary
  • Windows batch string manipulation in loop
  • Launching a new command window from Golang in Windows
  • how to translate xml using xslt with complex rules
  • Is it possible to make imports depend on the location of my Lua script instead of the current direct
  • How to resend request with android volley when not authorized
  • Removing event listeners on automatically created multiple elements
  • Can't access Tomcat 7 Manager app when running from Eclipse
  • Guava how to copy all files from one directory to another
  • You tube videos are not playing
  • in batch how do i use taskkill properly
  • Java making confirming exit
  • Delphi: Where is the shortcut that started the application? [duplicate]
  • Why people use prototype in javascript when it is easy to inherit using apply () and call () methods
  • Exception gevent.hub.LoopExit: LoopExit('This operation would block forever',)
  • Python delete lines of text line #1 till regex
  • How to specify input and output paths from cmd.exe for a PowerShell script?
  • Clarification on min distance on LocationManager.requestLocationUpdates method, min Distance paramet
  • Can I programmatically choose the Android layout folder?
  • How to disable all widgets inside Panel or inside Composite?
  • ViewController With Transparent Background Entering Current ViewController With Push Transition
  • SharedPreferences or SQLite Database?
  • How can I extract results of aggregate queries in slick?
  • Meteor: Do Something On Email Verification Confirmation
  • Debugging ASP.NET on a built-in web server suddenly stops
  • C# - Is there a limit to the size of an httpWebRequest stream?
  • Is my CUDA kernel really runs on device or is being mistekenly executed by host in emulation?
  • swift auto completion not working in Xcode6-Beta
  • Perl system calls when running as another user using sudo
  • Where to put my custom functions in Wordpress?
  • How to make Safari send if-modified-since header?
  • Jquery - Jquery Wysiwyg return html as a string
  • RestKit - RKRequestDelegate does not exist
  • InvalidAuthenticityToken between subdomains when logging in with Rails app
  • WPF Applying a trigger on binding failure
  • File not found error Google Drive API
  • How to get NHibernate ISession to cache entity not retrieved by primary key