Skip to content

Fix the regression bug: assume failure is not marked as skipped #946

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

Merged
merged 1 commit into from
Feb 24, 2020

Conversation

jdneo
Copy link
Member

@jdneo jdneo commented Feb 24, 2020

fix #945

@jdneo jdneo added this to the 0.22.2 milestone Feb 24, 2020
Copy link
Member

@Eskibear Eskibear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally I got that, first-line statement assumeTrue(false) is just something like @Ignore(if false == true)...

Though I have a question, not much related to this PR, what if this statement is not in the first line of the method body? Should it be "skipped"? But that's a little bit wired to me (beginner of junit), because some code did run, but it's skipped.

@jdneo
Copy link
Member Author

jdneo commented Feb 24, 2020

It's ok whether the assume statement is in the first line or not, the Test Runner will handle that situation and return back the right output to the output parser.

The Assume is used to do some condition check, so you can put wherever you want as long as you want to do some condition check. For example, if I want to make sure the test code will only be executed in the Windows environment, then I can write: AssumeTrue(System.getProperty("os.name").startsWith("Windows"))

@jdneo jdneo merged commit 770112f into master Feb 24, 2020
@jdneo jdneo deleted the cs/regression branch February 24, 2020 09:16
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.

Test runner does not skip assume case when the condition's not met
2 participants