Skip to content
mairbek edited this page Jan 17, 2011 · 9 revisions

junit-suite-configurator allows you to create and run JUnit test suite using simple EDSL.

Here is an example of suite configuration:

@RunWith(Suite.Configuration.class)
public class Suite {

    public static class Configuration extends AbstractConfiguration {

        public Configuration(Class<?> testClass) {
            super(testClass);
        }

        @Override
        protected void configure() {
            run(allInPackage("com.github.suiteconfig.tests")
                    .add(classes(Test1.class, Test2.class))
                    .filter(includeCategories(SmokeTest.class))
                    .filter(excludeCategories(BrokenTest.class))
                    .applyRule(new Rule1())
            ).invokeIn(parallel().classes().threadCount(3));
        }
    }
}
Clone this wiki locally