use of org.activityinfo.test.cucumber.ScenarioTestCase in project activityinfo by bedatadriven.
the class TestMain method queueFeatures.
private void queueFeatures(String environment, ResourceLoader loader, RuntimeOptions options, Module... driverModules) {
List<Module> modules = new ArrayList<>();
modules.add(new SystemUnderTest(url));
modules.add(new EmailModule());
modules.addAll(Arrays.asList(driverModules));
TestConditions conditions = new TestConditions(environment, modules);
Predicate<String> filter = filterPredicate();
List<CucumberFeature> features = options.cucumberFeatures(loader);
for (CucumberFeature feature : features) {
for (CucumberTagStatement element : feature.getFeatureElements()) {
if (filter.apply(feature.getPath()) || filter.apply(element.getVisualName())) {
ScenarioTestCase testCase = new ScenarioTestCase(options, feature, element, conditions);
queueTestCase(testCase);
}
}
}
}
Aggregations