A blog about my daily tech ramblings.

Friday, 4 September 2015

Conditionally ignoring tests in JUnit

September 04, 2015 Posted by Sachin Handiekar , No comments
We might require to ignore a jUnit test based on a certain condition. jUnit just comes up with a @Ignore annotation which can be used to ignore the test.

We can use the below code to check if the condition has been met or not to ignore a test.

Reference : http://stackoverflow.com/questions/1689242/conditionally-ignoring-tests-in-junit-4


Post a Comment