O'Reilly logo

JMeter Cookbook by Bayo Erinle

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Duration Assertion

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.

How to do it…

In this recipe, we will cover how to use the Duration Assertion component. Perform the following steps:

  1. Launch JMeter.
  2. Add Thread Group to the new test plan by navigating to Test Plan | Add | Threads (Users) | Thread ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required