JMeter - Ignore View Results Tree Listener only in non GUI

user7294900

Important best practice in not to use View Results Tree

Don't use "View Results Tree" or "View Results in Table" listeners during the load test, use them only during scripting phase to debug your scripts.

Or any listeners:

Use as few Listeners as possible; if using the -l flag as above they can all be deleted or disabled.

But View Results Tree is a great tool for debugging to identify issues in scripts.

Can we somehow ignore it only when running a non GUI mode?

I can ignore Sampler Result by setIgnore method, even ignore Thread Group by setting Number of Threads as 0 in property, can listener be ignored by property?

Currently I manually enable/disable in GUI before/after running in non GUI.

EDIT

But jmx files are saved in version control, so it should remain read only (used both for GUI and non GUI)

Dmitri T

I would say currently it is not possible with classic non-GUI mode of test execution, the options are in:

  1. Remove all the listeners from the test plan completely and control what is being stored in .jtl results file using Results File Configuration Properties
  2. Create a simple Java wrapper program to start a non-GUI JMeter test which will scan the Test Plan prior to starting and disable the listeners. It would be something like:

    StandardJMeterEngine jmeter = new StandardJMeterEngine();
    JMeterUtils.loadJMeterProperties("/path/to/your/jmeter.properties");
    JMeterUtils.setJMeterHome("/path/to/your/jmeter");
    JMeterUtils.initLocale();
    SaveService.loadProperties();
    HashTree testPlanTree = SaveService.loadTree(new File("/path/to/your/testplan"));
    SearchByClass<ResultCollector> listenersSearch = new SearchByClass<>(ResultCollector.class);
    testPlanTree.traverse(listenersSearch);
    Collection<ResultCollector> listeners = listenersSearch.getSearchResults();
    listeners.forEach(listener -> listener.setProperty(TestElement.ENABLED, false));
    jmeter.configure(testPlanTree);
    jmeter.run();
    
  3. Use Taurus tool to run your test, it has Modifications for Existing Scripts functionality so you will be able to disable listeners using simple declarative YAML syntax:

    ---
    execution:
      scenario:
        script: /path/to/your/testplan
        modifications:
          disable:  # Names of the tree elements to disable
          - View Results Tree
    

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

JMeter 5.0: View results in a tree listener shows result of last 100 threads only

Unable to see Response Body in JMeter, View Results Tree listener

JMeter View results tree listener displaying duplicate https requests

Non GUI Jmeter run with Listener

JMeter - view more results in View Results Tree

How to populate "Request -> Request Body" tab of a Jmeter Sampler result (displayed in the View Results Tree listener)?

Jmeter - Multiple user's session details retrieved incorrectly under "View results tree" listener

Graph Results via Non GUI mode in JMeter

Jmeter setting for sampler that it should not be in view results tree

Change Response Data in View Results Tree Jmeter

JMeter view results tree requests showing error

Jmeter Groovy Assert Keyword is not Causing Assertion Failure in Tree View Listener

JMeter - JSON render in view results tree show invalid JSON

Jmeter - java exception while clicking on response in View Results Tree

Where is HTML renderer of View Results Tree hidden in Jmeter 2.13

JMeter View Results in table

Error while trying to merge results from different JTL files using the MergeResults PLUGIN in JMETER NON GUI mode

What is the reason behind to fail aggregate report but view results in tree is all pass in jmeter?

JMeter: how can I disable a View Results Tree element from the command line?

Need help in capturing HTTP Request sent from View results tree sampler in Jmeter

Unable to view result tree jmeter

In Jmeter how to record/capture only error sampler data in raw JTL file through non gui mode?

"java.lang.IllegalArgumentException: Results log file is not empty" error showing while generate dashboard report for Non GUI mode in jmeter3.0

JMeter - override jtl file in non GUI with dashboard

log assertion result in NoN GUI mode[Jmeter]

Jmeter Non GUI mode timestamp date format

View results tree sampler in jenkins

JMETER non gui: Not able to generate folder using jmeter command line

Jmeter non-gui more request than gui issue