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

usage issue #55

Closed davesliu closed 5 years ago

davesliu commented 5 years ago

I downloaded the https://github.com/GHPReporter/Ghpr.NUnit.Examples

1 When I use NuGet to download the Ghpr.Console and compile the Ghpr.NUnit.Examples. It will display error that "Console.WriteLine()" can't parsed in .cs files. I need to use System.Console.Write() in .cs files to pass the build. So could someone update the Ghpr.Console plug-in to mitigate the build error?

  1. For the usage "Add relative path to Ghpr.NUnit.dll from build folder of your tests (example: addins/../../../Users/Evgeniy_Kosjakov/Documents/GitHub/Ghpr.NUnit.Examples/build/Ghpr.NUnit.dll) into nunit.bundle.addins"

In fact, there is no nunit.bundle.addins files in the package of NUnit.ConsoleRunner.3.10.0. It only has nunit.nuget.addins in tools directory of NUnit.ConsoleRunner.3.10.0. I added below content in

../../../../build/Ghpr.NUnit.dll

So could someone update the instruction?

After I modify the Ghpr.NUnit.Settings.json to latest version and copy it to the generated build directory of Ghpr.NUnit.Examples. Then I use nunit3-console to generate .xml file and use ghph.console to generate html format file successfully.

elv1s42 commented 5 years ago

Hi @davesliu !

Thank you very much for detailed issue description. Regarding your two points:

  1. The issue is related with the name on the Console project. Basically System.Console namespace conflicts with Ghpr.Console. I'll update the repository to use different namespace.

  2. The usage description from Ghpr.NUnit repository is related to the usage of NUnit Console which is installed locally on the machine where you are running tests. The description you've provided is related to the usage of NUnit Console downloaded as a NuGet package which is even better. I will update the usage description to use both approaches.

Thanks

davesliu commented 5 years ago

@elv1s42 Thank you very much for your help :-)

BTW, another question here: As we want to implement continuous integration for unit test with Jenkins. So is it possible to integrate the Ghpr.NUnit to the Jenkins?

elv1s42 commented 5 years ago

Hi @davesliu !

I've never tried it myself, but it should be possible. You can take a look at this README section: https://github.com/GHPReporter/Ghpr.Core#how-to-publish-the-report-in-jenkins

Thank you

elv1s42 commented 5 years ago

README updated: https://github.com/GHPReporter/Ghpr.NUnit/blob/master/README.md#with-nunit-3-consolerunner-nuget-package