1
Vote

Take screenshot on test failure

description

I was looking at the cloud service team UI tests and noticed some improvements we could make to our own UI tests.

In their test cleanup, they take a screenshot of the primary screen if the test failed (TestContext.CurrentTestOutcome != UnitTestOutcome.Passed). They save the file in the test output folder, using the TestContext.TestName and DateTime.Now for file name.

comments