le code ne fonctionne pas; la java console indique "No features found at [classpath:testGlueDemoqa]" gné ??
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package testGlueDemoqa; import org.junit.BeforeClass; import org.junit.runner.RunWith; import cucumber.api.junit.Cucumber; import testReports.JUnitTestReporter; @RunWith(Cucumber.class) // @CucumberOptions(features="FeaturesDemoQa", glue= "stepDefinitionDemoqa") public class Link_Cucumber_AutomationScript extends JUnitTestReporter { @BeforeClass public static void before() { int cpt = 1; String pathReport = "E:/reporting_cucumber/"; pathReport = pathReport + Integer.toString(cpt); String pluginReport = "--plugin pretty --plugin html:" + pathReport; System.setProperty("cucumber.options", "--features FeaturesDemoQa --glue stepDefinitionDemoqa"); System.setProperty("cucumber.options", pluginReport); System.out.println(" cpt = " + cpt + " - co : " + pluginReport); cpt +=1; } }
Pourtant, si je décommente la ligne @cucumberOptions, cela fonctionne parfaitement.
Je veux surcharger l'annotation @cucumberOptions pour archiver les reports, en ajoutant un répertoire sous la racine, pour ne pas écraser le run précédent.
Mais les commandes "System.setProperty ne fonctionnent pas.
Je capte pas le message d'erreur de la console. A l'aide !!
Partager