You can use test assertions to check how well your server responds to the load during a test.
You can create assertions for all metrics collected during the test run. Only basic assertions are available without the ReadyAPI Performance license. For a full list of assertions available with the Base license, see ReadyAPI Performance Licenses.
To find a full list of available metrics, see Metrics Reference.
For detailed information on how to create assertions, see Creating Assertions.
When you create an assertion, it is marked with a green circle ().
If the assertion fails during the test run, the circle will turn red ().
If there are no assertions or the assertion is disabled, the circle is grey ().
To edit an assertion, click the level at which the assertion resides. The inspector will appear. In the Assertions section of this panel, click the drop-down arrow.
|Rename the assertion.||Click the assertion name and enter the new name in the Rename Assertion dialog.|
|Enable or disable the assertion.||Set the Enabled setting in the General section to ON or OFF respectively.|
|Select the metrics to be measured.||Select different metrics from the drop-down lists in the General section.|
|Change minimum and maximum values that trigger the assertion.||In the Constraint section, enter new Min or Max values.|
|Select whether the load test should stop on assertion failure.||Set or clear the Stop LoadTest on failure check box in the Constraint section.|
|Set how often the assertion needs to trigger for the assertion error to be logged.||Edit the Max errors and Within period values in the Tolerance section.|
You can delete an assertion at any time by selecting it in the inspector and clicking in the Assertions section.
It may be difficult to decide how to assert the server performance, especially because test results may vary for different test runs. Tests may be affected by external causes such as network issues, disk activity, database backups, and so on. We recommend using the following approaches:
Create a “safety net” for your load test to detect when serious issues occur. For example, if you have a step that usually takes about 300 ms, create a TimeTaken – Median assertion for this test step with the 900 Maximum value. This would leave a large safety margin until the assertion triggers.
Create “quality of service” assertions to detect when many minor issues occur. Set the low assertion level (400 ms), but the tolerance level (it controls how many times the assertion can fail before the test fails) must be high (100).