Skip to content

Running two nugets Allre.Reqnroll and Allure.Xunit together #556

@zdmta

Description

@zdmta

Hi, I am suing Allure.Reqnroll and Allure.Xunit together as i have tests written also in plain XUnit. I am able to run Xunit tests sparatelly and get all results to allure report. Running just reqnroll tests without allure xunit nuget installed all is working fine and i am getting all results to allure report

However when running Reqnroll tests with installed both nugets i ma getting exception:

Assembly cleanup failed in DataView.SystemTests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

System.InvalidOperationException
Unable to change the container context because the test context is active.
at Allure.Net.Commons.AllureContext.ValidateContainerContextCanBeModified()
at Allure.Net.Commons.AllureContext.WithContainer(TestResultContainer container)
at Allure.Net.Commons.AllureLifecycle.<>c__DisplayClass34_0.b__0(AllureContext c)
at Allure.Net.Commons.AllureLifecycle.UpdateContext(Func2 updateFn) at Allure.Net.Commons.AllureLifecycle.StartTestContainer(TestResultContainer container) at Allure.ReqnrollPlugin.State.AllureReqnrollStateFacade.StartContainer() at Allure.ReqnrollPlugin.Events.HookStartedEventHandler.HandleInAllureContext(HookStartedEvent eventData) at Allure.ReqnrollPlugin.Events.AllureReqnrollEventHandler1.<>c__DisplayClass5_0.b__0()
at Allure.Net.Commons.AllureLifecycle.RunInContext(AllureContext context, Action action)
at Allure.ReqnrollPlugin.State.CrossBindingContextTransport.ApplyDirectStateTransition(AllureContext state, Action update)
at Allure.ReqnrollPlugin.State.CrossBindingContextTransport.ApplyStateTransition(ExecutionContextHolder executionContextBox, AllureContext state, Action update)
at Allure.ReqnrollPlugin.State.CrossBindingContextTransport.PropagateState(Action update)
at Allure.ReqnrollPlugin.Events.AllureReqnrollEventHandler1.Handle(T eventData) at InvokeStub_Action1.Invoke(Object, Span`1)
at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

System.InvalidOperationException
Unable to change the container context because the test context is active.
at Allure.Net.Commons.AllureContext.ValidateContainerContextCanBeModified()
at Allure.Net.Commons.AllureContext.ValidateContainerCanBeRemoved()
at Allure.Net.Commons.AllureContext.WithNoLastContainer()
at Allure.Net.Commons.AllureLifecycle.<>c.b__37_0(AllureContext c)
at Allure.Net.Commons.AllureLifecycle.UpdateContext(Func2 updateFn) at Allure.Net.Commons.AllureLifecycle.WriteTestContainer() at Allure.ReqnrollPlugin.State.AllureReqnrollStateFacade.EmitFeatureFiles() at Allure.ReqnrollPlugin.Events.FeatureFinishedEventHandler.HandleInAllureContext(FeatureFinishedEvent eventData) at Allure.ReqnrollPlugin.Events.AllureReqnrollEventHandler1.<>c__DisplayClass5_0.b__0()
at Allure.Net.Commons.AllureLifecycle.RunInContext(AllureContext context, Action action)
at Allure.ReqnrollPlugin.State.CrossBindingContextTransport.ApplyDirectStateTransition(AllureContext state, Action update)
at Allure.ReqnrollPlugin.State.CrossBindingContextTransport.ApplyStateTransition(ExecutionContextHolder executionContextBox, AllureContext state, Action update)
at Allure.ReqnrollPlugin.State.CrossBindingContextTransport.PropagateState(Action update)
at Allure.ReqnrollPlugin.Events.AllureReqnrollEventHandler1.Handle(T eventData) at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span1 copyOfArgs, BindingFlags invokeAttr)

Is there any way how to fix it/update to use both nugets and have both Xunit tests and reqnroll tests reported in one allure report? Any advise?

Reqnroll version: 2.2.1
XUnit version: 2.9.3

Allure.Reqnroll : 2.12.1
Allure.Xunit: 2.12.1

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions