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

Copper Contributor

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 : 

Yannick_FRINDEL_2-1659002250863.png

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>";
testCase.Actions.Add(newStep);

Thanks for your help... 

0 Replies