Table of content

Duration Assertion in JMeter

  • Duration assertion is used to verify how long a request takes to complete. The Duration measured in milliseconds, and, if any request lasts longer than the value specified, the sample is marked as failed.
The Following example Demonstrates the Duration Assertion
  • Launch the JMeter and then add a Thread Group to the Test Plan.
  • Next, right-click on the Thread Group > Add >Sampler> HTTP Request.
  • Set Server Name as inside the HTTP Request and path as/.
  • Next, add Duration Assertion to the HTTP Request and enter the Duration in Milliseconds as 1500MS.
  • Next, add View Result Tree Listener and Assertion Result to the Thread Group to View the Result.
  • Now, Save and run the Test Plan, if the HTTP Request contains the, if JMeter receives a response within the specified time1500 milliseconds then the result will be pass, else failed.
  • The Duration request has been passed successfully.
  • Now, I am going to change the Duration in Milliseconds to 100ms
  • Now, if you run the test plan, you will receive the below result.
0 results
Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions