I have been searching for something like this, but all what I have found was Fixed test order or completely random.
I have this kind of a test structure:
// imports
@RunWith(Suite.class)
@Suite.SuiteClasses({
// Tests
})
public class TestRunSuite {
}
and what do I want to do:
// imports
@RunWith(Suite.class)
@Suite.SuiteClasses({
testToExecuteFirst.class,
// Tests in random order
testToExecuteLast.class
})
public class TestRunSuite {
}
or
Is there a way how to make TestSuite execute in the middle of 2 functions ? What do I mean:
authentificationSetUp();
// somehow calling TestRunSuite
authentificationSetUpBack();
The reason why do I want to do this, is that I need to change the timeout of authentification on one website, but the thing is, that I need to logged in as an admin and tests are for other roles. So instead of going through all of those tests and putting to each @BeforeClass and @AfterClass these 2 tests.