Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change exception handling for TestNG (#312) #422

Merged
merged 1 commit into from
Sep 2, 2019

Conversation

janschaefer
Copy link
Contributor

@janschaefer janschaefer commented Sep 2, 2019

JGiven does not interact well with TestNG in case exceptions are thrown in step methods. Normally JGiven catches all exceptions to be able to report the following steps of a scenario and rethrows the exception at the end of a scenario. In JUnit this works as expected. In TestNG, however, the hook for JGiven comes too late to rethrow the exception. Thus TestNG always treats failing scenarios as success. This PR fixes this by not catching exceptions in steps anymore. The disadvantage of this is that the steps following a failed step cannot be reported anymore.

@janschaefer janschaefer added this to the v0.18.1 milestone Sep 2, 2019
@janschaefer janschaefer force-pushed the testng-exception-handling branch 2 times, most recently from 0f6ff10 to 8e83ddf Compare September 2, 2019 15:22
@janschaefer janschaefer merged commit 620b63e into release-0.x Sep 2, 2019
@l-1squared l-1squared deleted the testng-exception-handling branch January 11, 2022 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant