Sidebar

6. Adding Assertions to Load Tests


Assertions are validation rules applied to test results that check how your target web service performs during the test run.

Let's create an assertion that will check that the average simulation time of a single TestStep does not exceed some time limit:

  • Expand the test case and click the Response element of the TestStep you want to assert. The Editor panel will be displayed.
  • In the Assertions section of the Editor panel, click :

Assertion Panel

  • In the subsequent Add Assertion window, select the Time Taken statistic and the Median metric using dropdown lists:

Add Assertion Dialog

  • Configure other assertion parameters:
    • In the Maximum edit box, enter the maximum time the TestStep execution can take on average.
    • In the Tolerance section, set the maximum number of times the assertion should trigger before logging an error:
  • Click OK. LoadUI NG will add the assertion to your load test:

Added Assertion

  • Run the test again. If the responses take too long, LoadUI NG will report errors. View the assertion errors in the Global Metrics graph and in the TestSteps Metrics table:
    Assertion Failures

See Also

Help and Feedback

You did not find what you looked for?

© 2016 SmartBear Software


×
Didn't find an answer? Try searching here: