What's new in 3.16.1

Gatling 3.16.1 release notes.

For more detailed release notes, please check the 3.16.1 milestone on GitHub.

Kafka support

Gatling now provides a Kafka SDK, io.gatling:gatling-kafka-java for Java and Kotlin and io.gatling:gatling-kafka for Scala:

  • producing records, with a key, headers, a partition, and a value from any Gatling body
  • request-reply, measuring the time until the reply to a request is read, with replies matched by key, header, or value
  • waiting for a record that another system produces, to measure the end-to-end latency of a pipeline, either blocking the virtual user with consume or letting it continue with subscriptions
  • checks on the value, the key, and the headers of the records read
  • Avro, Protobuf, and JSON Schema keys and values, with a schema registry
  • SASL authentication (PLAIN, SCRAM, OAUTHBEARER, AWS MSK IAM, and GSSAPI) and TLS

See Kafka.

JDBC support

The JDBC feeder moved out of Gatling into a new JDBC SDK, io.gatling:gatling-jdbc-java for Java and Kotlin and io.gatling:gatling-jdbc for Scala, which also adds a JDBC protocol to load test databases:

  • connections from a JDBC URL or a DataSource, with a built-in connection pool
  • plain and prepared statements, with typed parameters and NULL values, batches, generated keys, and stored procedures with OUT and INOUT parameters
  • checks on update counts, rows, columns, generated keys, and OUT parameters
  • transactions, with isolation levels and read-only mode

If you use the JDBC feeder, add the new dependency: jdbcFeeder is no longer part of Gatling’s core modules.

See JDBC and the JDBC feeder.

MQTT 5 features

With mqttVersion_5, Gatling MQTT now supports the features of MQTT 5:

  • reason codes, session expiry with sessionExpiryInterval, and the limits the broker sends in CONNACK
  • publish, connect, and last will properties, such as contentType, responseTopic, messageExpiryInterval, and user properties
  • responses correlated on the Correlation Data property, with correlateByCorrelationData
  • subscription options, such as noLocal, retainAsPublished, and retain handling
  • Subscription Identifiers, with subscriptionIdentifier, and shared subscriptions

Gatling MQTT also brings:

  • an unsubscribe action
  • await and expect matching topic filters with wildcards
  • retain in the Java and Kotlin publish DSL
  • asyncNameResolution and perUserNameResolution, like HTTP, and DNS resolution on each connect
  • resendAttemptsMax to limit the resends of unacknowledged packets, and a configurable subscribeTimeout

See MQTT.

GraphQL

The Java and Kotlin GraphQL DSL catches up with Scala:

  • checkIf on GraphQL requests, see Check conditionally
  • requestName on graphqlWs connect, subscribe, and unsubscribe, and endpoint on connect, also take a function

Misc Core

verify, a simpler alternative to validate

verify validates the value a check extracted with a function that returns an error message to make the check fail, or nothing when the check passes. validate, which required returning the value and throwing an exception (in Scala, building a Validation), is deprecated. See verify.

Loop bounds evaluated once

The duration of time-based loops, the number of iterations of repeat and tryMax, and the sequence of foreach are now evaluated only once per virtual user, when it enters the loop, instead of on each iteration.

rendezVous re-arms, and takes a timeout

rendezVous now re-arms once it has released a batch of virtual users, so the next ones wait again, which makes it usable inside a loop or with users that keep arriving. It also takes an optional timeout, which starts when the first virtual user of a batch arrives: when it expires, the virtual users waiting so far are released, even if the batch is incomplete. See rendezVous.

andThen starts children right away

Sequential scenarios chained with andThen now start as soon as their parent completes, instead of on the next injector tick.

Faster JSON and CSS checks

The response body is now parsed once for all the jsonPath, jmesPath, and css checks of a response, instead of once per check, and only the parts of a JSON body that the checks read are parsed.

Misc HTTP

HTTP/2 overhaul

Gatling’s HTTP/2 support received many fixes and improvements:

  • HTTP/2 through proxies
  • HTTP/2 without TLS (h2c) with prior knowledge
  • browser-like flow-control windows, configurable with http2StreamWindowSize and http2ConnectionWindowSize
  • requests exceeding the server’s MAX_CONCURRENT_STREAMS are queued instead of failing
  • unprocessed streams are retried
  • response trailers, server push, Expect: 100-continue, and streamed request bodies no longer break the connection

Per request authentication and redirect settings

  • ignoreProtocolAuth makes a request opt out of the protocol’s basic or digest authentication.
  • enableFollowRedirect makes a request follow redirects when the protocol disables them.

WebSocket and SSE setCheck buffers

WebSocket and SSE setCheck can now match messages received before it was set, which are buffered. Configure the buffers with wsSetCheckBuffer and sseSetCheckBuffer. See Set a check.

Multi-valued form fields

The Java form check and formParamMap now support form fields with multiple values.

Misc JMS

  • priority and timeToLive set the JMS priority and time to live of a message.
  • correlationId sets the JMSCorrelationID of a message.

Edit this page on GitHub