I'm trying to figure out a good solution to having specific unit tests run with certain runtime configurations. For example:
public class TestClassAlpha() { @setup public void setup() { } @After public void tearDown() { } @Test @<only run in particular env> public void testA() { //whatever A } //always run below test no mater what env @Test public void testB() { //whatever B } } I am contemplating a custom annotation or custom rule perhaps, but i thought this has to be a question that comes up frequently as running tests in certain conditions (envs) is a very valid scenario. I did some limited searching within stack, and I didn't find anything that really that helped solidify either way.