Search⌘ K
AI Features

Checks

Explore how to use Gatling checks to validate HTTP responses during performance tests. Understand various check types including status codes, headers, body contents, and JSON paths. Learn how to extract, transform, validate, and save response data for use in testing scripts and simulations.

In the previous lesson, we learned about scenarios. In this lesson, we will learn about checks.

What are checks?

Checks validate the response received from the server and save it to the user session if needed. We can apply multiple checks on the same response.

checks provide a DSL for chaining the following steps:

Note: It is not necessary to have all these steps. Defining check is the only mandatory step.

Types of checks

Here we define what kind of check we want to perform. The following table shows the different types of checks that Gatling provides:

Type Description
status HTTP status code
currentLocation absolute URL of the current page
currentLocationRegex(pattern) extract part of the URL using the given regular expression from the absolute URL of the current page
...