How to bring jenkins job to fail when Gatling load tests underperform How to bring jenkins job to fail when Gatling load tests underperform jenkins jenkins

How to bring jenkins job to fail when Gatling load tests underperform


  1. Gatling-specific solution: you need to define a global assertion in your Gatling script like:

    setUp(scn.inject( ... ))    .protocols(httpProtocol)    .assertions(        global.successfulRequests.percent.greaterThan(99))
  2. Alternative. You can consider running your Gatling script using Taurus tool as a wrapper. It can consume existing Gatling tests and apply flexible Pass/Fail Criteria to them. In case of failure trigger Taurus will return non-zero exit code hence Jenkins job will fail.


If Dmitri's 1 failed for you, see https://groups.google.com/forum/#!topic/gatling/OjsdqXej2_s

setUp(scn.inject( ... )    .protocols(httpProtocol))  .assertions(    global.successfulRequests.percent.greaterThan(99))