snippetMinor
What are best practices to implement Gatling in CI?
Viewed 0 times
implementwhataregatlingpracticesbest
Problem
Gatling creates an HTML report:
What are best practices to read the output and check whether it is acceptable, i.e. if a certain value is larger and smaller than X? Should one create a custom script or does Gatling itself provide such a functionality?
Reports generated in 0s.
Please open the following file: /path/to/target/gatling/recordedsimulation-1496161958749/index.html
[info] Simulation RecordedSimulation successful.
[info] Simulation(s) execution ended.
[success] Total time: 31 s, completed May 30, 2017 6:32:57 PMWhat are best practices to read the output and check whether it is acceptable, i.e. if a certain value is larger and smaller than X? Should one create a custom script or does Gatling itself provide such a functionality?
Solution
https://gatling.io/docs/2.3/extensions/jenkins_plugin/
https://wiki.jenkins.io/display/JENKINS/Gatling+Plugin
Configuration
job's name should contain any space.
For a pipeline job: add a line to your pipeline script: gatlingArchive()
Optional configuration: You can publish Gatling results with the
Jenkins JUnit plugin. Your Gatling simulation needs to have some
assertions, as each Junit testcase is a different Gatling assertion.
https://wiki.jenkins.io/display/JENKINS/Gatling+Plugin
Configuration
Install Gatling Plugin (via Manage Jenkins -> Manage Plugins)
Configure your project to execute Gatling simulations, for example using the Maven plugin (see Maven plugin documentation)
Configure your job :
For a maven job: add "Track a Gatling load simulation" as a new post-build action. Beware that neither your Jenkin's path nor yourjob's name should contain any space.
For a pipeline job: add a line to your pipeline script: gatlingArchive()
Optional configuration: You can publish Gatling results with the
Jenkins JUnit plugin. Your Gatling simulation needs to have some
assertions, as each Junit testcase is a different Gatling assertion.
Configure the Jenkins plugin with the following Test report XMLs: target/gatling/assertions-*.xml
Execute Gatling with the following option: -Dgatling.useOldJenkinsJUnitSupport=true, for example: mvn gatling:execute -Dgatling.useOldJenkinsJUnitSupport=trueCode Snippets
Install Gatling Plugin (via Manage Jenkins -> Manage Plugins)
Configure your project to execute Gatling simulations, for example using the Maven plugin (see Maven plugin documentation)
Configure your job :
For a maven job: add "Track a Gatling load simulation" as a new post-build action. Beware that neither your Jenkin's path nor yourConfigure the Jenkins plugin with the following Test report XMLs: target/gatling/assertions-*.xml
Execute Gatling with the following option: -Dgatling.useOldJenkinsJUnitSupport=true, for example: mvn gatling:execute -Dgatling.useOldJenkinsJUnitSupport=trueContext
StackExchange DevOps Q#1262, answer score: 1
Revisions (0)
No revisions yet.