Load testing involves the execution of load testing scripts. How does one define the success or failure of a load testing script. Assume for simplicity that our test contains only one web page. If there is a server error (HTTP code 500) or the page was not found on the server (HTTP code 404), we can safely consider the test a failure.
However, what if a web page is loaded (with an HTTP success code of 200), but it is not the correct web page. In cases like this, there is no way for the load testing tool to automatically determine whether the loaded web page is correct or not. The user has to clearly define success and failure. The user needs to indicate the difference between a valid web page and an invalid web page. The easiest way to do this is to use a text checkpoint.
A text checkpoint enables you to find out whether a specified text string is present in a specified location of the web page’s HTML. A text checkpoint allows you to verify if a text string can be found in the response between two specifed text strings. Text checkpoints will be basing their result on the fetched HTML response and thus it is necessary to allow for HTML tags in these text strings.
If you wish to ensure that your load testing tool can correctly distinguish between valid and invalid web responses, make sure you utilize text checkpoints. This will allow the load testing tool to more precisely judge whether the script should pass or fail the load test.