In my Eclipse project (Eclipse Luna) I have a few JUnit test cases that I don't want to run in the full regression test. For instance because they require a user to be present to verify the result (such as , if a sound properly played), or because they only run properly on specific systems. These tests are mostly used manually when making changes to the class under test. I have used @Ignore
to ignore those tests.
When I run a class with ignored tests in it from Eclipse (Run As -> Junit test) it will show the ignored tests as ignored in the test list.
Is there a way to force run the ignored tests from Eclipse?
Currently I always remove the @Ignored
tag, but it is easy to forget to ignore the tests again before committing my changes. Is there a better way to do this?
I expected Eclipse to have an option in the JUnit View of an ignore test also run Ignored tests , but I can't find it.
You could use JUnit's Categories. Create a category for the tests that need manual interaction and exclude that category in your automated build.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With