-
Notifications
You must be signed in to change notification settings - Fork 100
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
Feature/issue 373 improve testing for jupiter #827
Feature/issue 373 improve testing for jupiter #827
Conversation
|
||
public class GuaranteedFieldRealTest extends ScenarioTest<GuaranteedFieldRealTest.RealGiven, GuaranteedFieldRealTest.RealWhen, GuaranteedFieldRealTest.RealThen> { | ||
@ExtendWith(JGivenReportExtractingExtension.class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably not necessary, we don't test these with JUnit5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, we should probably move those into core at some point
} | ||
|
||
@Override | ||
public String getFailureMessage(int i) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explain better how these failure message routine came to be
@@ -2,5 +2,6 @@ | |||
|
|||
public enum TestFramework { | |||
JUnit, | |||
JUnit5, | |||
TestNG | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add empty line for POSIX conformity
{ TestFramework.JUnit }, | ||
{ TestFramework.TestNG }, | ||
} ); | ||
return Arrays.stream(TestFramework.values()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try if TestFramework.values() will work just fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation indicates that this won't be the case
160e5e3
to
3d2fc1c
Compare
} | ||
|
||
@Test | ||
public void a_succeding_JUnit5_test() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in succeeding
|
||
@Test | ||
@Issue("#25") | ||
public void test_classes_with_only_ignored_test_result_in_a_valid_report() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it somehow possible to give this method some better name? Needed some time to figure out which word groups belong to the same context. Like "test_classes_which_consist_of_only_ignored_tests" or something.
Also update JGiven Framework tests to also test Junit5 Signed-off-by: l-1sqared <[email protected]>
Signed-off-by: l-1sqared <[email protected]>
JUnit5 offers to use the same class instance over several methods. This however is not in line with the scenario concept of JGiven. The JGivenExtension removes the scenario after the exection of each state, resulting in failure if the next scenario is executed on the same instance Moreover, it is unclear how scenarios that share the same instance react when these methods are executed in parallel. In addition, the JUnit 5 testframework tests were adapted. It turns out that when JUnit5 fails on the class level it returns a successful report model for method but a failure for the class level. Signed-off-by: l-1sqared <[email protected]>
3d2fc1c
to
1bc9d4a
Compare
No description provided.