问题
I saw several solutions for NUnit 2.x version. For example, I can create XSLT, or use Allure Reporter.
But how can I do it for NUnit 3.x version (without writing my own XSLT for NUnit XML results)?
Allure does not work with NUnit3.
回答1:
I would suggest using GHPReporter. You can create reports for NUnit 3, SpecFlow and MSTest.
No additional attributes required for NUnit 3. Just set up addin (see short instruction in README file: https://github.com/GHPReporter/Ghpr.NUnit) and run your tests with NUnit3 Console.
View your report locally in Firefox:
- Go to
about:config
- Find
security.fileuri.strict_origin_policy
parameter - Set it to
false
View your report locally in Chrome:
- Close your Chrome (all instances)
- Launch it with
--allow-file-access-from-files
option: egC:\PATH TO\chrome.exe --allow-file-access-from-files
Also see demo report here
EDITED
NUnitGo is no longer maintained.
来源:https://stackoverflow.com/questions/35219661/are-there-any-ways-to-create-html-report-for-nunit3