I have some common set up code that I\'ve factored out to a method marked with @Before. However, it is not necessary for all this code to run for every single t
Not sure about @Before, but I recently came up with a strategy for @After block to run selectively. The implementation was straight forward. I have some flags set to default values as part of the test class. They are reset to default values in @Before class. In the class I need to do things specific to a flag, I set those flags & in @After I check for flag values to do the respective jobs.