Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Attachment Nodes for Screenshot Mapping #37

Closed
seanhotaling opened this issue Jun 12, 2018 · 12 comments
Closed

Support Attachment Nodes for Screenshot Mapping #37

seanhotaling opened this issue Jun 12, 2018 · 12 comments

Comments

@seanhotaling
Copy link

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.

<test-case>
  <output>...</output>
  <attachments>
    <attachment description="This is a description of this screenshot.">
      <filePath></filePath>
    </attachment>
    <attachment description="This is a description of this screenshot.">
      <filePath></filePath>
    </attachment>
  </attachments>
</test-case>

This would reduce the need for ScreenHelper.

@elv1s42 elv1s42 self-assigned this Jun 12, 2018
@elv1s42
Copy link
Member

elv1s42 commented Jun 12, 2018

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.

@elv1s42 elv1s42 added this to Backlog in Ghpr Common Jun 13, 2018
@elv1s42 elv1s42 moved this from Backlog to ToDo in Ghpr Common Jun 13, 2018
@elv1s42
Copy link
Member

elv1s42 commented Jun 21, 2018

All additional output will be stored under a separate tab like this:
image

@elv1s42 elv1s42 moved this from ToDo (Prioritised) to InProgress (Dev/QA) in Ghpr Common Jun 21, 2018
@seanhotaling
Copy link
Author

seanhotaling commented Jun 21, 2018

@elv1s42, is this in reference to the above enhancement or #36?

@elv1s42
Copy link
Member

elv1s42 commented Jun 21, 2018

@sean-hotaling yes, sorry.
I had both issues opened in different tabs.

@elv1s42
Copy link
Member

elv1s42 commented Jun 21, 2018

By default all attachments with extentions .png, .jpeg and .bmp will be considered as test screenshots and displayed in the report.

@elv1s42
Copy link
Member

elv1s42 commented Jul 2, 2018

This now has been released too. Please see the release notes here

@seanhotaling
Copy link
Author

seanhotaling commented Jul 2, 2018

@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.

@elv1s42
Copy link
Member

elv1s42 commented Jul 3, 2018

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.

@elv1s42
Copy link
Member

elv1s42 commented Jul 3, 2018

Please use the latest version which is v.0.9.1

@seanhotaling
Copy link
Author

@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.

@elv1s42
Copy link
Member

elv1s42 commented Jul 3, 2018

@sean-hotaling Sorry, I'll try to debug and fix it tomorrow then

@elv1s42
Copy link
Member

elv1s42 commented Jul 4, 2018

Hi @sean-hotaling, it should finally work in v0.9.1.1

Ghpr Common automation moved this from InProgress (Dev/QA) to Done (Aw. Release) Jul 6, 2018
@elv1s42 elv1s42 moved this from Done (Aw. Release) to Released (all work done and released) in Ghpr Common Aug 21, 2018
@elv1s42 elv1s42 moved this from Released (NuGet package) to Archive in Ghpr Common Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Ghpr Common
  
Archive
Development

No branches or pull requests

2 participants