JMeter – Assertion Results

JMeter - Assertion Results Listener

This listener is used to display the assertion result. It shows a summary of passed and failed samplers due to not meeting the assertion condition. JMeter Assertion Results listener throws a message in case of failure as given in the below figure:

JMeter - Assertion Results
Figure 01: JMeter – Assertion Results

How to add ‘Assertion Results’?

Follow the below steps:

  1. Select the appropriate element where you want to add the listener
    1. Test Plan
    2. Thread Group
    3. Controller
    4. Sampler
  2. Right-click on the element
  3. Hover the cursor on ‘Add’
  4. Hover the cursor on ‘Listener’
  5. Click ‘Assertion Results’

Scope: Assertion Results Listener can be added at any level that is sampler level, transaction level, thread-level or test plan level. The assertion result will be displayed as per the scope only. If the assertion result listener is added under a sampler then it will show the pass or fail status of that particular sampler only. If it is added under a transaction level then it will show the assertion status of all the samplers under that particular transaction controller. 

Use: It is basically used for debug purpose during script creation.

Recommendation: Disable Assertion Results Listener during test execution as it consumes memory to write a log into a file.


Leave a Reply

Your email address will not be published. Required fields are marked *