GHPReporter / Ghpr.Console

Console application to convert NUnit and MSTest test result files into Ghpr HTML Report
http://ghpreporter.github.io/
MIT License
5 stars 5 forks source link

In the Test details page, 'Output' Tab are empty although there do have some value in origin XML file #38

Closed zhuyumi closed 5 years ago

zhuyumi commented 5 years ago

Describe the bug I use the latest version of NUnit console runner to execute some test cases from a testcase.dll, and get an XML result in Nunit3 XML format.

After I use GHPReport console runner to convert it into HMTL result. in "Test details" page, 'Main' Tab looks good, but 'Output' Tab is empty.

I go back and check in the original XML result file, there do have some out logs, it just not showing up in the converted HTML file.

To Reproduce Steps to reproduce the behavior:

  1. Execute testcases.dll with latest Nunit3 console runner, and get an XML format result file.

  2. Use GHPReporter_console to convert XML file into HTML files. using code $originalTestResultFile = "C:\TestResults\NunitTestResult.xml" C:\GHPReporter\GHPReporter_console\Ghpr.Console.exe $originalTestResultFile in powershell. This image is what's in my GHPReporter_console folder: image

  3. Then we have a folder of HTML result like this: image

  4. We open the HTML result page and go to any Test details page. We can see that 'Main' Tab looks good, but 'Output' and 'Extra output' Tabs are empty. please see 2 images below: image image

  5. I go back and check the XML file, I do see expect 'output' part has value like: image

Expected behavior In HTML files, we expect the 'Output' tab to have the value that exists in XML file

Screenshots Please see screenshots above

Desktop (please complete the following information):

Attached XML file and HTML files Attached the original XML file and the result HTMLs I generated with console runner. XML+HTMLs.zip

davesliu commented 5 years ago

Maybe caused by the browser setting as shown in

https://github.com/GHPReporter/Ghpr.Core

Firefox Go to about:config Find security.fileuri.strict_origin_policy parameter Set it to false

Chrome Close your Chrome Launch it with --allow-file-access-from-files option: eg C:\PATH TO\chrome.exe --allow-file-access-from-files

zhuyumi commented 5 years ago

Thanks for the info @davesliu , but I already launch Chrome as you mentioned. If I don't launch Chrome like that, the 'Main' Tab would be empty as well(I tried that.) Now that the 'Main' Tab loads fine, we won't have the concerns as you suggested.

elv1s42 commented 5 years ago

Hi @woshizhuyumi ! This is bug, I'll investigate it and try to release the fix ASAP.

Thank you!

zhuyumi commented 5 years ago

Thank you @elv1s42 , you are responding so quick!

elv1s42 commented 5 years ago

@woshizhuyumi , can you please confirm what NuGet package versions you are using?

zhuyumi commented 5 years ago

Hi, @elv1s42 , I believe the Ghpr.Nunit I'm using is 0.9.9.0, and Ghpr.core is 0.9.9.1. please see image

elv1s42 commented 5 years ago

Hi @woshizhuyumi !

The bug was in the Ghpr.LocalFileSystem package, I've published the new version (0.9.9.2) which should contain the fix.

Can you please confirm the issue is no longer affecting you once you generate the report using updated packages?

Thank you

zhuyumi commented 5 years ago

Hi @elv1s42 , I pulled the latest package of Ghpr.LocalFileSystem and it solves the problem, the issue is gone. Thanks again for the quick response!

elv1s42 commented 5 years ago

Thank you @woshizhuyumi , I'm closing the issue then.