Closed seanhotaling closed 6 years ago
Hi @sean-hotaling !
Thank you for this issue. Agreed to support NUnit test attachments in the generated report. But ScreenHelper will be supported because there are some upcoming changes with general Ghpr.Core structure to support the ability of saving test results ont only as local .json files but as database records too.
Thanks.
All additional output will be stored under a separate tab like this:
@elv1s42, is this in reference to the above enhancement or #36?
@sean-hotaling yes, sorry. I had both issues opened in different tabs.
By default all attachments with extentions .png
, .jpeg
and .bmp
will be considered as test screenshots and displayed in the report.
@elv1s42, thanks much! Will this be updated to be used from your console package? It looks like the suite output will show in the report but not the screenshots from the attachment nodes.
Edit: Nothing to do with the console package, sorry. I did notice though that you save the screenshots into a TestScreenshotDto
within GhprTestCase
, but nothing is ever done with those screenshots. It seems like the only screenshots making it into the json are the ones from GhprTestRun.Screenshots
.
Hi @sean-hotaling ,
This now should work for both NUnit Console Addin (this package) and Ghpr.Console package (used to generate reports from .xml
results file).
Thank you.
Please use the latest version which is v.0.9.1
@elv1s42, thanks for the quick updates. Unfortunately, I installed 0.9.1 and am still not seeing those screenshots in the report. I see the /img/ folder created now with my screenshot copied over, but the controller isn't picking it up: screensInfo.length
in the controller is 0.
@sean-hotaling Sorry, I'll try to debug and fix it tomorrow then
Hi @sean-hotaling, it should finally work in v0.9.1.1
With recent releases of NUnit,
AddTestAttachment(string filePath, string description = null);
allows screenshots to now be mapped to the test case: https://github.com/nunit/docs/wiki/TestContext.This would reduce the need for ScreenHelper.