SpecFlow+LivingDoc is failing the execution status for Assert.Pass()
I am writing a scenario, where I am checking for the presence of a locator based on permission to the logged-in user. The code snippet is as below:
if (!permissionList.Contains("Workflow"))
{
if (await page.Locator(workflowLink).CountAsync() > 0)
{
Assert.Fail("User doesn't has permission to access Workflow, but is able to. Hence failed");
}
else
Assert.Pass("User doesn't has permission to access Workflow, and isn't able to". Hence passed);
}
I am using Playwright+Specflow with NUnit, with the below versions of Nuget packages:
When I am using the statement Assert.Pass("Some message"), the execution in VS is passed. But SpecFlow sets the execution status of a test case as "TestError" in the TestExecution.json file and the execution status as failed in LivingDoc.


I want to have the same execution status in both VS and LivingDoc HTML files. Please help me with the issue.
0
Please sign in to leave a comment.
Comments
0 comments