Allure.Reqnroll with MSTest | Not able to update test status in the -result.json file #2921
Unanswered
singh-swati28
asked this question in
Bug Reports
Replies: 2 comments 1 reply
-
|
Hi @delatrie |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Hi, @singh-swati28 As for the ability to post-process Allure result objects, it will become possible as soon as allure-framework/allure-csharp#488 gets implemented. Sorry for not giving specific dates |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
In my C# Reqnroll + MSTest project, test scenario execution is being intentionally skipped based on some flag, for eg: execute test for US and skip using Assert.Inconclusive("This test is intentionally skipped for other countries") if any other country is specified in Feature file test data.
Since Asert.Inconclusive throws exception, the test is marked as broken when allure results files are generated.
In order to display intentionally failed tests as Skipped in Allure Report, I am using AllureLifecycle UpdateTestCase method to update Steps and overall Test status to Skipped
After the step is executed (where the test is being intentionally skipped), I am updating test status in AfterScenario hook using following code
While debugging, I can see that the testResult.Status is updated to skipped in the Current TestContext .
However, when the execution is over and the -results.json is generated, only steps[].status got updated to 'skipped' and 'status' field is still set to 'broken'.
Can anyone please look into this and suggest the right way to update 'status' field?
Note: This is working fine with Specflow+Xunit/MSTest and Allure.Specflow plugin using AllureLifecycle.Instance.UpdateTestcase. In specflow, the status is set to broken initially and I was able to set it to skipped based on status details message but with Reqnroll and MSTest, initially the test status is none and then its getting overwritten )from skipped to broken) once the test exited the AfterScenario hook
@baev
@delatrie
@fescobar
Beta Was this translation helpful? Give feedback.
All reactions