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

The test is marked as passed although it raises a TechTalk.SpecFlow.BindingException #296

Open
1 of 3 tasks
jordimarchparga opened this issue Sep 30, 2022 · 0 comments
Open
1 of 3 tasks

Comments

@jordimarchparga
Copy link

I'm submitting a ...

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

We execute a test and it raises and TechTalk.SpecFlow.BindingException but it isn't catched by the AllureLifCycle object and it is marked as passed.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

We are using Specflow 2 with NUnit 3.
In order to reproduce the scenario is: you have to decored two step methods with the same specflow test. Beacause we have did it in our test suite by error.

    [When(@"I save and back")]
    public void WhenIGoBackCancelingAnyChanges()
    {
        ...
    }


    [When(@"I save and back")]
    public void WhenISaveAndBack()
    {
       ...
    }

When you do this by error, NUnit catches the TechTalk.SpecFlow.BindingException and only it's logged by NUnit. The ScenarioContext don't have logged the exception and specflow don't excute the BeforeStep hook.

In allure results files the failing step has the status none:
"name": "And I save and back",
"status": "none",

And the next steps are marked as skipped. But the information about the fail is in the TestResult object of NUnit.

What is the expected behavior?

We expect that the test was marked as Broken.

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Allure version: 2.4.2.4
  • Test framework: Specflow 2 and NUnit 3
  • Allure adaptor: [email protected]
  • Generate report using: Allure-Docker-Service

Other information

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

1 participant