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-like annotation used to record soft asserts #1645

Closed
shreyasarjun opened this issue Apr 8, 2019 · 1 comment
Closed

@Step-like annotation used to record soft asserts #1645

shreyasarjun opened this issue Apr 8, 2019 · 1 comment

Comments

@shreyasarjun
Copy link

  @Step("Validate testcase 1")
public void validate_TC1 () 
  {

Assert.assertEquals(4,5);	

}

@Step("Validate testcase 2")
public void Validate_TC2()
{
    Assert.assertEquals("TESTING","TESTING");
  
}

@Step("Validate testcase 3)
public void Validate_TC3()
{

    Assert.assertEquals("SERENITY","SERENITY");
}

In the above example, If testcase 1 failed then testcase 2 and 3 is not executing.
So I need to execute testcase 2 and testcase 3 also even if tescase1 failed.
How to achieve this in serenity by using @step annotation.
But if we use @test annotation then there is no issue But it will not capture in test reports.
That's why I want to achieve this by using @step annotation only.
Could you please help on this.

@wakaleo
Copy link
Member

wakaleo commented Apr 8, 2019

That's how the @step annotation is intended to work - it is meant for sequences of actions, not soft asserts. However I will look into adding a different annotation or option to allow assertion-style steps in a future release.

@wakaleo wakaleo changed the title @Step Dependencies @Step-like annotation used to record soft asserts Apr 8, 2019
@wakaleo wakaleo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants