A Gatling driver for loadtest4j.
-
Add the library to your
pom.xml
:<dependency> <groupId>org.loadtest4j.drivers</groupId> <artifactId>loadtest4j-gatling</artifactId> <scope>test</scope> </dependency>
-
Configure the driver in
src/test/resources/loadtest4j.properties
:loadtest4j.driver.duration = 10 loadtest4j.driver.url = https://example.com loadtest4j.driver.usersPerSecond = 1
-
Optional: Add advanced Gatling configuration in
src/test/resources/gatling.conf
. -
Write your load tests using the standard LoadTester API.
To reduce Gatling log output, change the log threshold for its noisiest classes in your SLF4J logger configuration.
If you are using Logback (the default Gatling logger), you could configure logback.xml
like this:
<configuration>
<!-- Set up the root logger and appender, then include these lines -->
<logger name="akka.event.slf4j.Slf4jLogger" level="OFF" />
<logger name="io.netty" level="OFF" />
<logger name="io.gatling" level="OFF" />
<logger name="org.asynchttpclient.netty" level="OFF" />
</configuration>