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

xUnit.net: Using xRetry to retry tests throws InvalidOperationException #539

Open
1 of 3 tasks
tkeerthivel opened this issue Aug 28, 2024 · 2 comments
Open
1 of 3 tasks

Comments

@tkeerthivel
Copy link
Contributor

tkeerthivel commented Aug 28, 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?

After adding xRetry or Xunit.DependencyInjection.xRetry to a project having Allure.Xunit package, System.InvalidOperationException is thrown when running any test.

System.InvalidOperationException : No fixture context is active.

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

  1. To a project having Allure.Xunit package and tests, add xRetry or Xunit.DependencyInjection.xRetry package.
  2. Annotate the constructor with [AllureBefore].
  3. Run any test.
  4. The test won't start and throws the above error.

What is the expected behavior?

The test should run without any errors

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

To retry failed tests

Please tell us about your environment:

  • OS: Windows
  • .NET framework: .NET 8
  • Allure version: 2.12.1
  • Test framework: xUnit

Other information

Message: 
System.InvalidOperationException : No fixture context is active.

Stack Trace: 

AllureLifecycle.UpdateFixture(Action`1 update) line 322
AllureLifecycle.StopFixture(Action`1 beforeStop) line 345
ExtendedApi.ResolveItem(Func`2 stop, Exception error) line 625
ExtendedApi.ResolveFixture(Exception error) line 258
AllureAbstractStepAspect.ThrowFixture(MethodBase metadata, Exception e) line 79
AllureAbstractStepAspect.OnTargetInvokeException(MethodBase metadata, Exception e) line 100
AllureAbstractStepAspect.WrapSyncVoid(Func`2 target, Object[] args, MethodBase metadata, String stepName, List`1 stepParameters) line 144```

@tkeerthivel tkeerthivel changed the title Using xRetry to retry xUnit tests throws InvalidOperationException xUnit.net: Using xRetry to retry xUnit tests throws InvalidOperationException Aug 28, 2024
@tkeerthivel tkeerthivel changed the title xUnit.net: Using xRetry to retry xUnit tests throws InvalidOperationException xUnit.net: Using xRetry to retry tests throws InvalidOperationException Aug 28, 2024
@StanislavKlo
Copy link

Any updates on this? We also need this feature as soon as possible

@tkeerthivel
Copy link
Contributor Author

@delatrie Can you help with this? If there is any other alternative, please let us know.

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

3 participants