Another useful assertion component that comes bundled with JMeter is the Duration Assertion component. Like its name implies, this component is used to test that each response returns within a given time specified by the user. Any response that doesn't return within the specified time is marked as a failed response. For example, this can be particularly useful when testing API calls for application services, or ensuring the accumulative service calls to render a page are all performing efficiently.
In this recipe, we will cover how to use the Duration Assertion component. Perform the following steps:
Launch JMeter.
Add Thread Group to the new test plan by navigating to Test Plan | Add | Threads (Users) | Thread Group.
Add the HTTP Request sampler by navigating to Thread Group | Add | Sampler | HTTP Request.
Fill in its attributes in the following way:
Server Name or IP:
evening-citadel-2263.herokuapp.com
Method:
GET
Path: N/A
Add the Duration Assertion component...