What's new in 3.16
Gatling 3.16 release notes.
For more detailed release notes, including patch releases, please check the milestones on GitHub.
GraphQL support
Gatling now provides a GraphQL SDK for Java, Kotlin and Scala (JavaScript and TypeScript are not supported yet):
- queries and mutations, sent with
POSTorGET, with variables, and checks rooted at thedata,errorsandextensionsmembers of the response - error policies, because GraphQL servers usually answer with a
200status even when the operation failed - operation naming, so that requests are reported under the name of the operation rather than the endpoint they share
- Automatic Persisted Queries, over
POSTorGET - subscriptions over WebSocket, with the
graphql-transport-wsprotocol
See GraphQL.
Better mutual TLS (mTLS) support with per virtual user client certificates from a single PKCS#12 file
perUserKeyManagerFactory now accepts the path of a single PKCS#12 file containing one key entry per virtual user, instead of requiring a custom function.
This is available on both HTTP and MQTT.
See HTTP perUserKeyManagerFactory and MQTT per virtual user client certificates.
Inter-virtual users communication with shared queues
Gatling now provides shared queues so that virtual users can exchange data: they can put values into a named queue, and take, poll or get the size of it. See Shared queues.
Misc Core
Passing headers for separated-values feeders without a header line
Separated-values feeders such as csv used to require the first line of the file to contain the column names.
It’s now possible to explicitly pass them with headers when the file doesn’t have a header line.
Storing a value in the Session with setInSession
Gatling now provides a setInSession step that evaluates a Gatling EL expression or a function and stores the result in the Session.
This is convenient when the result is random and must be used in multiple places, so the expression can’t be inlined.
See setInSession.
Post checks
HTTP requests, the HTTP protocol, WebSocket checks and SSE checks now support postCheck: a function that’s applied on the Session resulting from the checks, after they’ve been applied, to implement complex extra validation.
Throw an exception (in Scala, return a Failure) to make the request or the check fail.
See HTTP request post checks.
New Gatling EL functions
Gatling EL has two new built-in functions:
randomString(length)andrandomString(length,charset)generate random Strings, without having to import an extra library such as Datafaker just for this.randomOneOf(a,b,c)picks a random value among the ones passed as arguments.
See Built-in functions.
Incremental counters
Gatling now provides built-in counters that store an incrementing value into the Session, with support for custom start, increment and upper bound, wrapping around, per virtual user tracking and sharding across a Gatling Enterprise cluster. See Counters.
Misc HTTP
Sending HTTP QUERY requests
Gatling now provides a built-in for the HTTP QUERY method, a safe and idempotent method that, unlike GET, allows a request body.
See Method and URL.
Standalone WebSocket checks
WebSocket checks can now be set on their own with setCheck(), without having to connect or send a message first, for example to wait for a message pushed by the server.
See Set a check.