Gatling を使用して簡単なパフォーマンス テストを実行しようとしています。私はmavenを使用してプロセスを実行します。コードの変更によってガトリング テストが中断された場合に簡単に検出するために、maven ビルドを失敗させたいと考えています。<failOnError>true</failOnError>
pom.xml ファイルに必ず追加しました。
私の現在のスクリプトは次のようなものです:
class MySim extends Simulation {
val httpProtocol = http.baseURL("http://localhost:8080")
val scn = scenario("Test")
.exec(http("request_1")
.get("""/helloworld""")
.check(status.is(200))
)
setUp(scn.inject(ramp(1 users) over (1 seconds))).protocols(httpProtocol)
}
常に成功する maven を使用して (gatling-maven-plugin を使用して) ビルドを実行しますmvn clean gatling:execute
。(サーバーが実行されていない場合でも)。ガトリング テストが失敗した場合 (または失敗率が高すぎる場合)、maven ビルドが失敗することを確認する方法を探しています。