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 case failed using FluentAssertions or Playwright are shown as broken instead of failed #520

Open
1 of 3 tasks
I37937 opened this issue Jun 10, 2024 · 4 comments
Open
1 of 3 tasks

Comments

@I37937
Copy link

I37937 commented Jun 10, 2024

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?

The test case failed using fluentassertions or Playwright are shown as broken instead of failed

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

Create a simple test using FluentAssertions or Playwright dotnet, when you run the tests the resutl is shown as broken
image

What is the expected behavior?

The test should be failed if I have configured the list of exceptions (failExceptions).

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

Please tell us about your environment:

Other information

I was taking a look to the AllureNUnitHelper and I was able to see that the IsBroken function is waiting elements in result.Assertions list but when you use FluentAssertions or Playwright this list is not update so the tests are always mark as broken.
image

@gamerka
Copy link

gamerka commented Jun 10, 2024

@I37937
Copy link
Author

I37937 commented Jun 10, 2024

Yes, I do, I have added the exceptions but I still having the same issue
image

@arman-avetisyan
Copy link

Hello, I have the same issue,
I am using Xunit, Allure.Net.Commons and Shouldly
When I run a test with this simple step, and generate an Allure report
the test status displayed as Broken
image

Also, I tried to add the Shouldly.ShouldAssertException to the allureConfig.json, the step becomes Failed but the test is still displayed as Broken
image

@flydyk
Copy link

flydyk commented Jun 10, 2024

Looks like this code is making a test report broken despite the settings
https://github.com/allure-framework/allure-csharp/blob/main/Allure.Xunit/AllureXunitHelper.cs#L39-L42

            var status = failure.ExceptionTypes.Any(
                exceptionType => !exceptionType.StartsWith("Xunit.Sdk.")
            ) ? Status.broken : Status.failed;

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

5 participants