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

JUnit runner does not distinguish between pending and ignored via Assume #1007

Closed
RichardBradley opened this issue May 25, 2016 · 3 comments · Fixed by #1145
Closed

JUnit runner does not distinguish between pending and ignored via Assume #1007

RichardBradley opened this issue May 25, 2016 · 3 comments · Fixed by #1145
Labels
⚡ enhancement Request for new functionality

Comments

@RichardBradley
Copy link
Contributor

JUnit tests can be marked as "ignored" via the Assume API. If an assumption fails, then JUnit will mark the test as "ignored". Tests in this state do not count as failures.

Cucumber tests can be in "pending" state if they have undefined steps. Tests in this state should count as a failure if "strict" is set.

The cucumber.api.junit.Cucumber JUnit test runner doies not distinguish between these two cases; both are either failures or not according to the "strict" setting.

I believe that the "strict setting should make "pending" tests a failure, but not make "ignored" tests a failure.

@RichardBradley
Copy link
Contributor Author

See #359 -- I think it's wrong to treat "Assume" the same as "pending": the former means "ignore without failing" whereas the latter means "fail if strict or ignore if not strict".

@mpkorstanje
Copy link
Contributor

This will be partially resolved in version 2.0.0 once #1142 merged.

This won't cause tests to be marked as SKIPPED in Cucumber. They'll be marked as PENDING but when non-strict is enabled but these count as skipped in JUnit terms.

I think it's wrong to treat "Assume" the same as "pending": the former means "ignore without failing" whereas the latter means "fail if strict or ignore if not strict".

@brasmusson how do you feel about mapping AssumptionViolatedException to SKIPPED?

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
⚡ enhancement Request for new functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants