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

Exceptions in setup methods do not generate results #342

Open
1 of 3 tasks
vladdex opened this issue Apr 6, 2023 · 2 comments
Open
1 of 3 tasks

Exceptions in setup methods do not generate results #342

vladdex opened this issue Apr 6, 2023 · 2 comments
Labels

Comments

@vladdex
Copy link

vladdex commented Apr 6, 2023

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?

If something fails in a OneTimeSetup or Setup decorated method there are no results generated for the tests inside the class

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

Code Example

using NUnit.Allure.Core;

namespace allure;

[TestFixture]
[AllureNUnit]
public class SetupError
{
    [OneTimeSetUp]
    public void Setup()
    {
        Console.Out.WriteLine("SetupStep");
        throw new Exception("Exception");
    }

    [Test]
    public void Test1()
    {
        Console.Out.WriteLine("Test1");
    }
}

What is the expected behavior?

Test should be logged as skipped

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

Tests that are failed because of failed setup steps are completely missing from the report which can cause them to be missed completely

Please tell us about your environment:

  • Allure version: 2.1.0
  • Test framework: NUnit 3.13.3, Nunit3TestAdapter 4.4.2
  • Allure adaptor: Allure.NUnit 2.9.5-preview1
  • Generate report using: Allure CLI

Other information

This happens probably because of #325

@neparij
Copy link
Contributor

neparij commented Apr 11, 2023

Fixing now.

@vladdex
Copy link
Author

vladdex commented May 10, 2023

@neparij do you have an ETA for this ?

@delatrie delatrie added the bug label Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants