Hi @bartoszmajsak, @aslak,
This is my idea about the API for the test scheduling feature.
@RunWith(ArquillianScheduling.class)
@Scheduler(LatestFailedScheduler.class)
public class TestClass {
@Deployment
public static WebArchive deploy() {
return Deployments.Client.full();
}
@Test
public void test(){}
}
The ArquillianScheduling.class could be a separate runner that extends Arquillian runner or this functionality could go in the default runner at some point.
public class ArquillianScheduling extends Arquillian {
private Scheduler scheduler;
ArquillianScheduling(Class<?> testClass){
super(testClass);
// Read the Scheduler annotation
scheduler = new Scheduler(getChiildren());
// Apply filtering and sorting
filter(scheduler.getFilter());
sort(scheduler.getSorter());
}
@Override
public void run(final RunNotifier notifier){
super.run(scheduler.getSpyingNotifier(notifier));
}
}
The first scheduler would be LastFailedScheduler that will put all the failed tests from the previous test run first. By default it will use the local file system to store the necessary statistics information.
I am waiting for your comments.