Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step define are not displays on report when extend class different package #12

Open
minhpham1990 opened this issue May 16, 2022 · 3 comments

Comments

@minhpham1990
Copy link

minhpham1990 commented May 16, 2022

Hi,
I am using serenity with junit5, i have defined step class as follow:
image

In CommonStep.class

public class CommonStep {
    @Step("#actor this is step common")
    public void  testStep(){
        System.out.println("Hello CommonStep");
    }

In 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.

image

@minhpham1990
Copy link
Author

@wakaleo can you help me?

@wakaleo
Copy link
Member

wakaleo commented May 18, 2022

Looks like a bug. I rarely use inheritence in steps, so haven't ever come across this.

@wakaleo
Copy link
Member

wakaleo commented May 18, 2022

I can't seem to reproduce it though:

image
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants