Friday, February 19, 2016

Jmeter - Using Duration Assertion Amongst Example

| Friday, February 19, 2016
Duration assertion is used to assert the answer fourth dimension of asking inwards jmeter software charge exam plan. It volition assert that answer of asking is received inside given amount of fourth dimension or not. If answer of asking is received inwards given amount of fourth dimension thence it volition locomote buy the farm together with if it exceeds given amount of fourth dimension thence it volition locomote fail. Let's acquire how to purpose duration assertion inwards jmeter software charge exam plan.

Add Duration Assertion In Software Load Test Plan
You tin mail away add together duration assertion parallel to asking or nether asking of your software charge exam plan. To add together it nether request,
  • Right click on asking -> Add -> Select Assertions -> Duration Assertion. Please aspect inwards to the bellow given image.

It volition add together duration assertion nether selected request.

Example : Assert Response Time of Request Using Duration Assertion
I attain got prepared uncomplicated event to tech you lot purpose of  duration assertion inwards jmeter software charge exam plan. Test innovation config is equally bellow.
  • I attain got added ii HTTP request.
  • Under each request, Added Duration Assertion and Assertion Results.
  • 1st request's Duration Assertion : Set Duration inwards milliseconds = 200
  • 2nd request's Duration Assertion : Set Duration inwards milliseconds = 5000
  • Thread Group Config : Number of Threads = 1, Ramp upwards menses = 1, Loop count = 1.
  • Added sentiment consequence inwards tree listener nether thread group.

You tin mail away meet that duration inwards milliseconds = 200 for 1st duration assertion together with duration inwards milliseconds = 5000 for 2nd duration assertion.

Now when you lot piece of occupation to a higher house sample software charge exam plan, consequence of 1st duration assertion volition looks similar bellow.


You tin mail away meet inwards consequence that asking has taken 1274 milliseconds to consummate which is greater than expected 200 milliseconds thence assertion is failed. 2nd assertion is buy the farm equally nosotros laid duration inwards milliseconds = 5000.

This agency you lot tin mail away purpose duration assertion inwards your software charge exam innovation to assert fourth dimension duration of request.

Related Posts