Sample Project - 2. Web LoadTest with Assertions

PDF Print E-mail
User Rating: / 10  |  Rate this article: PoorBest 

2. Web Load Test With Assertions

Intro

Let’s extend the Simple Web LoadTest TestCase. The base trifecta is the same, but we’ll add some verification, assertions as well as a TableLog that shows the output from the assertions.

Preparations

running performance test distribution in local mode

Make sure you are in Local Mode in the System toolbar at the bottom of this window, and then run the LoadTest by pressing the Run button on the top left toolbar

The Limit

If the last TestCase didn’t have a limit, the only way to stop it was to manually stop it, this TestCase will be different. This LoadTest will run until either 100000 requests have been sent or there have been 100 assertion failures (whichever comes first).

This is set in the TestCase Toolbar where you can see;

test-limits

  1. How long time a TestCase has run and what the limit is
  2. How many Requests a TestCase has run and what the limit is
  3. How many Failures s a TestCase has had and what the limit is

Please note that Time only has one value in our sample, this is because we have not set a time limit for the test.

The Setup

As we mentioned earlier the basic test is the same, so let’s look at what we’ve changed.
Web Load Test with Assertions Overview

  1. Assertion
    This Assertion is connected to the request output of the Web Page Runner, allowing it to assert (validate) the contents of each requests. We will set it to check that the TimeTaken is never over 100ms
  2. Assertion (1)
    This assertion is connected to the second output of the Web Page Runner, which outputs the stats you can see in the display of the runner. We will use the assertion to make sure there are no Discarded messages.
  3. Assertion (2)
    This last assertion is used to assert the Avg response time as calculated and output by the statistics component. We will set the max value to 50 ms
  4. Table Log
    The TableLog is connected to the output of all assertions; it will contain all failed assertions which we can export or log continuously while running

Note

Note a few things:

  • What Value you can use in the Assertion depends on what output terminal (a terminal is that round little thing used for connecting components) you choose. For example the Web Page Runner delivers different Values in the Results (connected to Assertion) and in the Runner Statistics (connected to Assertion (1)).
    automated assertions
  • Table logs can be saved to file for further analysis, just click the save button
    saving load test data

 


Go to Article Page: Go to Previous Page 1 2 3 4 5 Go to Next Page