user1559625
user1559625

Reputation: 2673

Why Cucumber JVM does not fail step or step definition when an exception is thrown?

I am writing cucumber jvm test code using junit as runner. Some how i notice that even though the test code is throwing a lot of runtime exceptions. The step/step definitions still show as 'PASSED' in report.

If i remembered correctly, i've use cucumber jvm before and it always fail the steps whenever there is an exception. But now, i can only fail the step when assertion fail.

What am i missing here? Could anyone give an advice/hint?

Upvotes: 1

Views: 816

Answers (1)

Nael Marwan
Nael Marwan

Reputation: 1038

Are you using try catch statements? if so then you see the catch block logs. If you want to let the scenario fail then use how possible more asserts and Boolean functions. Can't help you out with the info you shared.

Upvotes: 1

Related Questions