Create (in C#) steps with screenshots for a test case in Azure DevOps

Occasional Visitor

In Azure DevOps I can create in C# the test cases with the steps, but I don't know how to integrate directly the screenshots in the fields.

By chance, do you know how to insert (with a C# code) directly the screenshot in the "Action" field or the "expected result" field of the steps ?

Like this for example : 


I tried with a code like this, but it doesn't work :

ITestStep newStep = testCase.CreateTestStep();
newStep.ExpectedResult = @"<p><img src='data&colon;image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA...=' alt/></p>";

Thanks for your help... 

0 Replies