has anyone tried to fail the running Jenkins Job when Gatling asserts are not met or if the requests fail?
For instance:
- mark a Jenkins build as unstable when the Global mean value for the 95th percentile is under a specific value, say 1.2 sec for response time
- mark a Jenkins build as failed if a certain percent of requests are not answered
Does anyone have an idea how this can be achieved with the existing Maven / Jenkins plugins for Gatling.
my maven Plugin settings are:
<plugin>
<groupId>io.gatling</groupId>
<artifactId>gatling-maven-plugin</artifactId>
<version>${gatling.version}</version>
<configuration>
<failOnError>true</failOnError>
<simulationsFolder>src/test/scala</simulationsFolder>
<runMultipleSimulations>true</runMultipleSimulations>
<configFolder>src/main/resources</configFolder>
</configuration>
<executions>
<execution>
<id>GoOrBust</id>
<phase>test</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<simulationClass>mine.OnePunch</simulationClass>
<failOnError>true</failOnError>
</configuration>
</execution>
</executions>
</plugin>
the <failOnError>true</failOnError>
will only influence the report generation but not the Jenkins Job (obviously).
I would prefer not to explicitly throw exceptions from inside the tests by doing custom exception monitoring / handling.