Hi ,
I'm trying to do some setup before the Test cases start and i'm using @BeforeClass Annotation in the Runner to do the same. The Runners are executed in Parallel using maven surefire plugin (all run in 1 JVM). The @BeforeClass of each Runner Class takes care of the setup required for its TestCases. I'm trying to save these setup output to Serenity so that my Test cases can directly access them from Serenity. But apparantly The values are not saved to serenity.
@RunWith(CucumberWithSerenity.class)
@CucumberOptions(
features = { "src/test/resources/features/Feature1.feature"},
plugin = {"pretty", "html:target/cucumber", "json:target/cucumber/cucumber-feature1report.json", "rerun:target/rerun/rerun4.txt"},
glue = {"my.gluecode.packages" }
)
public class FeatureOneParallelRunner {
private FeatureOneParallelRunner() {
}
@BeforeClass
public static void setup() {
String userName = DataManager.getUserName("Feature1User");
// I want to save userName to Serenity here
}
@AfterClass
public static void teardown(){
// Do some teardown stuff here
}
}
Hi , I'm trying to do some setup before the Test cases start and i'm using @BeforeClass Annotation in the Runner to do the same. The Runners are executed in Parallel using maven surefire plugin (all run in 1 JVM). The @BeforeClass of each Runner Class takes care of the setup required for its TestCases. I'm trying to save these setup output to Serenity so that my Test cases can directly access them from Serenity. But apparantly The values are not saved to serenity.
The Pom for the same is
It uses JUnit 4.12 Please let me know if you need any more details.