lundi 4 janvier 2021

mvn test doesn't fail when Cucumber scenario fails

I have a RunCucumberTest class as described in the JUnit section here and a Cucumber scenario that fails when run from the gutter icon in IntelliJ. However, why does mvn test build successfully?

[WARNING] Tests run: 482, Failures: 0, Errors: 0, Skipped: 12
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:10 min
[INFO] Finished at: 2021-01-04T15:54:51-05:00
[INFO] ------------------------------------------------------------------------

I can see in the log that the scenario failed:

............................................F--.....................................................................................
Failed scenarios:
com/rose/sample.feature:23 # Feature name
26 Scenarios (1 failed, 25 passed)
132 Steps (1 failed, 2 skipped, 129 passed)
0m0.596s
org.junit.ComparisonFailure: expected:<x> but was:<y>

Aucun commentaire:

Enregistrer un commentaire