/** * {@inheritDoc} */ @Override public List<String> getFeaturePaths() { return this.ros.getFeaturePaths(); }
public File fromTheConfiguredPaths() throws IOException { for(String path : CucumberWithSerenity.currentRuntimeOptions().getFeaturePaths()) { if (Files.exists(candidatePath(path, featureFileName))) { return candidatePath(path, featureFileName).toFile(); } } throw new IOException("No such feature file found for " + featureFileName); }
public File fromTheConfiguredPaths() throws IOException { for(String path : CucumberWithSerenity.currentRuntimeOptions().getFeaturePaths()) { if (Files.exists(candidatePath(path, featureFileName))) { return candidatePath(path, featureFileName).toFile(); } } throw new IOException("No such feature file found for " + featureFileName); }
public Runtime build() { if (classLoader == null) classLoader = testClass == null ? Thread.currentThread().getContextClassLoader() : testClass.getClassLoader(); if (resourceLoader == null) resourceLoader = new MultiLoader(classLoader); if (pluginFactory == null) pluginFactory = new PluginFactory(); if (runtimeOptions == null) { Preconditions.checkArgument(!args.isEmpty() || testClass != null, "RuntimeOptions not provided, need args or testClass"); runtimeOptions = args.isEmpty() ? new RuntimeOptionsFactory(testClass).create() : new RuntimeOptions(pluginFactory, args); } runtimeOptions.getFeaturePaths().addAll(featurePaths); for (Object plugin : plugins) { runtimeOptions.addPlugin(plugin); } String progressOutputFilePath = System.getProperty("minium.cucumber.progressOutputFile", null); if (progressOutputFilePath != null) { File progressOutputFile = new File(progressOutputFilePath); runtimeOptions.addPlugin(new ProgressFormatter(progressOutputFile)); } runtime = new Runtime(resourceLoader, classLoader, backends, runtimeOptions); return runtime; }
private static RuntimeOptions loadRuntimeOptions(final Class<?> javaTestClass, final Properties cukespaceConfigurationProperties) { final RuntimeOptions runtimeOptions; if (javaTestClass.getAnnotation(CucumberOptions.class) != null) { // by class setting final RuntimeOptionsFactory runtimeOptionsFactory = new RuntimeOptionsFactory(javaTestClass); runtimeOptions = runtimeOptionsFactory.create(); cleanClasspathList(runtimeOptions.getGlue()); cleanClasspathList(runtimeOptions.getFeaturePaths()); } else if (cukespaceConfigurationProperties.containsKey(CucumberConfiguration.OPTIONS)) { // arquillian setting runtimeOptions = new RuntimeOptions(new Env("cucumber-jvm"), asList((cukespaceConfigurationProperties.getProperty(CucumberConfiguration.OPTIONS, "--strict") + " --strict").split(" "))); } else { // default runtimeOptions = new RuntimeOptions(new Env("cucumber-jvm"), asList("--strict", "--plugin", "pretty", areColorsNotAvailable(cukespaceConfigurationProperties))); } return runtimeOptions; }
RuntimeOptions runtimeOptions = currentRuntimeOptions(); List<String> tagFilters = runtimeOptions.getTagFilters(); List<String> featurePaths = runtimeOptions.getFeaturePaths(); int batchNumber = environmentVariables.getPropertyAsInteger(SERENITY_BATCH_NUMBER, 1); int batchCount = environmentVariables.getPropertyAsInteger(SERENITY_BATCH_COUNT, 1);
RuntimeOptions runtimeOptions = currentRuntimeOptions(); List<String> tagFilters = runtimeOptions.getTagFilters(); List<String> featurePaths = runtimeOptions.getFeaturePaths(); int batchNumber = environmentVariables.getPropertyAsInteger(SERENITY_BATCH_NUMBER, 1); int batchCount = environmentVariables.getPropertyAsInteger(SERENITY_BATCH_COUNT, 1);