GHPReporter / Ghpr.NUnit

Adapter for NUnit 3 (generate HTML report for NUnit 3)
http://ghpreporter.github.io/
MIT License
35 stars 14 forks source link

NUnit Test Attachments aren't working as Screenshots #52

Closed vanderkyl closed 4 years ago

vanderkyl commented 5 years ago

Describe the bug I am trying to add screenshots to the GHP report by using Nunit Test Attachments. The attachment is in the test result xml file, but it is not showing up in the html report.

Here is the screenshot code. This occurs in [TearDown]:

            var screenshot = ((ITakesScreenshot)Driver.Get()).GetScreenshot();
            string fileName = CurrentTestNameToJPG();
            screenshot.SaveAsFile(fileName);
            TestContext.AddTestAttachment(fileName, "Failure Screenshot");

And here is the attachment in the xml file:

`

C:\Screenshots\TQAA1271_SuccessfulStudentLogin_20190506_16-47-15.jpeg

`

Expected behavior The screenshot should show up in the GHP report under "Screenshots" Screenshotsghpr

GHPR Version - 0.8.0.2 NUnit 3 Console - 3.7

elv1s42 commented 4 years ago

Hi @vanderkyl !

This functionality was release later. Please see the release notes for more details: https://github.com/GHPReporter/Ghpr.Core/blob/master/RELEASE_NOTES.md#v09

The corresponding issue with feature request: https://github.com/GHPReporter/Ghpr.NUnit/issues/37