-
Notifications
You must be signed in to change notification settings - Fork 163
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
Running a test suite causes all @BeforeClass instances to be run #49
Comments
could you provide a minimal example that reproduces the error? |
It looks like the issue is caused by @RunWith(DataProviderRunner.class) |
Hi @metasonic, hm ... I am aware of the behavior that But you write about an error if you don't have any Cheers, |
Here is a link with an example related to the error // @BeforeClass We are doing selenium related tests, and use the @BeforeClass to open a browser, in this case the fact that all @BeforeClass are run at the start is an issue. It would be great if there is any way we could avoid this and keep the old flow. |
I am very sorry, but I get no error running However, the problem with |
It's not an urget issue but it's a blocker for what can be considered further updates, features, improvements. |
1 similar comment
It's not an urget issue but it's a blocker for what can be considered further updates, features, improvements. |
Is there any update according to an exmample @metasonic ? |
hey, sorry for the high delay, i no longer have access to that code, will try to replicate it but don't know if i will be able to do so. |
…e starting up JUnit even if no test from this method will be executed (#49, #64) * also for abstract test bases @BeforeClass is invoked too often and incorrectly in time * another user complains about failing tests using it in combination with @Categories and IDEs * see tickets for more information about the discussions
I have the following setup, where I group a series of classes based on the area they target.
The problem is that with version 1.9.2 and above this setup is no longer working correctly, instead of taking each class at a time, and running everything in it (@BeforeClass, , @test, @test,, @afterclass) the setul will run all the @BeforeClass methods from all the test classes before going back to running one class at a time, so (@BeforeClass1, @BeforeClass2, @BeforeClass3, @BeforeClass4, @BeforeClass5 , @Test1Class1, @Test2Class1...)
This will cause an error if i don;t have a @BeforeClass in any of my tests
The text was updated successfully, but these errors were encountered: