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

Add Output from OneTimeSetup and OneTimeTearDown Methods #36

Closed
seanhotaling opened this issue Jun 7, 2018 · 8 comments
Closed

Add Output from OneTimeSetup and OneTimeTearDown Methods #36

seanhotaling opened this issue Jun 7, 2018 · 8 comments

Comments

@seanhotaling
Copy link

While I find the logs from each test-case output node useful within the report, it would be even more useful to include the test-suite output as well. The test-suite output can potentially be added to the Output tab for each test or to a new Output tab when clicking on what is now the collapsible links in the test list. The first approach needs to keep in mind that suites can be nested as found below, and will need to contain only the test-suite output for the suite(s) they are a part of. The second approach allows for a hierarchical view of what was executed where (minus the OneTimeTearDown as its output is lumped in with the output from OneTimeSetUp).

What is currently found:

<test-case ...>
...
<output><![CDATA[2018-06-06 13:27:50.419		T12		Start Test - TestRunId: , TestCaseId: , NUnitName: 'TestScripts.ServicePortalTests.TestDownloadToAllDevicesInCampus'
2018-06-06 13:27:55.532		T12		Event Navigated to xxxxx:55555/
Additional detail: Current URL is http://xxxxx:55555/login
2018-06-06 13:27:55.547		T12		Info Logging into ServicePortal
Additional detail: user: 'xxxxx', password: 'xxxxx', expectEror: False
2018-06-06 13:28:08.101		T12		Exceptions logged during test 1-1018:
   at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
   ...
2018-06-06 13:28:08.101		T12		
********************************************************************************
End Test - Status: 'Failed', TestRunId: , TestCaseId: , NUnitName: 'TestScripts.ServicePortalTests.TestDownloadToAllDevicesInCampus'
1 tests run; 0 passed; 1 failed; 0 skipped
********************************************************************************
]]></output>
</test-case>

What I'd like to see added:

<test-suite ...>
...
<output><![CDATA[2018-06-06 13:27:45.736		T9		Start Run; NUnit parameters: { 'e': 'xxxxx', 'r': 'false', 'c': 'false', 'l': 'Info', 'o': 'C:\Program Files (x86)\Jenkins\workspace\Test\test-output' }.
2018-06-06 13:28:08.191		T9		End Run; passed: 0, failed: 1, skipped: 2.
]]></output>
...
<test-suite ...>
...
<output><![CDATA[2018-06-06 13:27:45.778		T12		Start Suite - ServicePortalTests.
2018-06-06 13:27:45.802		T12		Info Fixture 'TestScripts.ServicePortalTests' will run in environment 'xxxxx'.
2018-06-06 13:28:08.185		T11		End Suite - ServicePortalTests; passed: 0, failed: 1, skipped: 2.
]]></output>
...
</test-suite>
</test-suite>

Please see TestResult.zip for a small example of the XML generated from an NUnit run.

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

elv1s42 commented Jun 7, 2018

Hi @sean-hotaling,
Thank you for this issue.
I'll try to investigate both of the solutions and come back to discuss what solution would be more useful.

Thank you

@elv1s42
Copy link
Member

elv1s42 commented Jun 13, 2018

Hi @sean-hotaling !

I think this should be implemented as a separate tab on test run page.
There is a plan to move each test output into separate file: GHPReporter/Ghpr.Core#40
This file should also include output from test-suite. Adding test-suite output to collapsible test list will slow down loading of this list because we will have to load output of each test.

Can you please let me know if it makes sense to you?

Thank you

@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
@seanhotaling
Copy link
Author

@elv1s42, yes. That makes sense to me.

@elv1s42 elv1s42 moved this from ToDo (Prioritised from the Backlog) to InProgress (Dev/QA work) in Ghpr Common Jun 14, 2018
@elv1s42
Copy link
Member

elv1s42 commented Jun 21, 2018

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

@elv1s42
Copy link
Member

elv1s42 commented Jun 26, 2018

Hi @sean-hotaling
Works fine for your .xml file (tested locally):

image

I'll include this in the next release

@seanhotaling
Copy link
Author

@elv1s42, awesome. I will look for the next release then. Thanks.

@elv1s42
Copy link
Member

elv1s42 commented Jul 2, 2018

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

@seanhotaling
Copy link
Author

@elv1s42, this works great. Thanks!

Ghpr Common automation moved this from InProgress (Dev/QA) to Done (Aw. Release) Jul 3, 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