Gatling is tool for load/stress testing that can be used to create stress tests in websites.
In this tutorial, we will create a Gatling simulation containing some basic HTTP interaction and we evaluate the obtained results in terms of performance and failure requests, using Gatling's assertions.
Gatling v2.2 release added support for JUnit reports, which can be processed by Xray.
Below is the simulation class containing 3 assertions. This code was directly run inside Gatling's folder after extracting the v2.2.3 release Gatling bundle.
After successfully running the Test Case and generating the JUnit XML report, it can be imported to Xray (either by the REST API or through the Import Execution Results action within the Test Execution).
Every Gatling's assertion is mapped to a Generic Test in Jira, as is the initial check for the HTTP status code. The Generic Test Definition field contains the full name of the class.
The Execution Details of the Generic Test contains information about the Test Suite, which in this case corresponds to the full name of the simulation class.
When an assertion fails, then the actual value is displayed in the execution details.
As a side note, Gatling also generates an HTML report that provides many interesting and useful information in the context of load testing, including some interactive charts.