一千萬個為什麽

搜索

在CI中實施Gatling的最佳實踐是什麽?



Gatling creates an HTML report:

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 PM

讀取輸出並檢查它是否可接受的最佳實踐是什麽,即如果某個值大於或小於X?應該創建一個自定義腳本還是Gatling本身提供這樣的功能?

轉載註明原文: 在CI中實施Gatling的最佳實踐是什麽?

一共有 1 個回答:

https://gatling.io/docs/2.3/extensions/jenkins_plugin/

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 your

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.

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=true