'Serenity: Step define are not displays on report when extend class different package
I am using Serenity with junit5, i have defined step class as follow:
Two classes CommonStep and ShopStep not in same package
CommonStep.class
public class CommonStep {
@Step("#actor this is step common")
public void testStep(){
System.out.println("Hello CommonStep");
}
ShopStep.class
public class ShopStep extends CommonStep {
@Step("#actor this is step of ShopStep")
public void testShopStep() {
System.out.println("Hello ShopStep");
}
}
In test file
@ExtendWith(SerenityJUnit5Extension.class)
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
public class TC_CreateShop{
@Steps
ShopStep I;
@Test
public void test(){
I.testShopStep();
I.testStep();
}
}
It run correct but in report, all steps of CommonStep which extended by ShopStep is not displayed.
Note: If both CommonStep, and ShopStep in same package , all steps in report are displayed correctly
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
