문제

Specifically I am interested for Jenkins to mark build as failed (or has bugs) when there are any undefined steps in any scenario. Integration of Behat with Jenkins is done through JUnit formatted reports.

So,

Question 1: Can Behat write JUnit report for scenario with undefined step as failed?

Question 2: I have noticed that return code of Behat = 0 if all tests are succeeded, but some of them have undefined steps. Are there any flags to change this behavior and have Behat return code other than 0 for such cases?

도움이 되었습니까?

해결책

If you use the --strict option, it should treat Undefined and Pending steps as failures (and exit with exit status of 1)

Source: http://docs.behat.org/en/latest/guides/2.definitions.html#undefined-steps

다른 팁

You can use Text-finder plugin to search console log for a RegEx matching your "undefined steps", and change the build status if found.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top