Gatling Test is failed, but gatling mave plugin returns BUILD SUCCESS

Hi,

Our test script development in gatling maven plugin, integrated with Jenkin Pipeline. Jenkin jobs always success though the gatling test is failed.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

<gatling-maven-plugin.version>3.1.1</gatling-maven-plugin.version>

Please kindly help how to fix this.

Regards,
Umeshwaran.V

What do you mean by “gatling test is failed”?
Have you configured any assertions?

Hi Stephane,

I have added the assertions. The below screenshots errors in the gatling execution, but still maven result is “Build Success”.
Jenkin job is not failing for gatling errors.

Regards,
Umesh

Hi Umesh,

Are you using assertions? Without assertions, the test will not fail. Have you for example used the below?

.assertions(
global.allRequests.count.gte(minimumSuccessful),
global.successfulRequests.percent.gte(percentageSuccessful)
)

Looking more carefull it seems your assertion is “that there should be more than zero failures”… This would be the reverse of what you are requesting.

Thanks… Its working now.