Some Links:
Core |
MSTest |
MSTestV2 |
NUnit |
SpecFlow |
Console |
Site Repo
Ghpr.NUnit.dll
from build folder of your tests (example: _addins/../../../Users/EvgeniyKosjakov/Documents/GitHub/Ghpr.NUnit.Examples/build/Ghpr.NUnit.dll) into nunit.bundle.addins
file (file located in [nunit_console_location]/addins). Also make sure that your build contains such libraries and files as Ghpr.Core.dll
, Ghpr.NUnit.dll
, Ghpr.LocalFileSystem.dll
, Ghpr.NUnit.Settings.json
and Newtonsoft.Json.dll
: Ghpr.NUnit.dll
located in your build folder into nunit.nuget.addins
in tools directory of NUnit.ConsoleRunner.3.10.0. Also make sure that your build contains such libraries and files as Ghpr.Core.dll
, Ghpr.NUnit.dll
, Ghpr.LocalFileSystem.dll
, Ghpr.NUnit.Settings.json
and Newtonsoft.Json.dll
.Please, read this 'How to publish the report in Jenkins'
instruction.
If you want to add screenshots to your report, you need to implement your own method of taking screenshot as byte[]
. This is needed because there is no way to take screenshot which will work on any testing framework or CI tool (such as Jenkins or TeamCity). If you are using WebDriver, you can take screenshot using WebDriver. Also NUnit attachments are supported.
[Test]
public void TestMethod()
{
var bytes = TakeScreenshot(); //your implementation
//all you need to do is to pass byte[] to ScreenHelper:
ScreenHelper.SaveScreenshot(bytes);
}
If you want to be able to take screenshots for failed tests, you can take a look at this approach:
[TearDown]
public void TakeScreenIfFailed()
{
var res = TestContext.CurrentContext.Result.Outcome;
if (res.Equals(ResultState.Failure) || res.Equals(ResultState.Error))
{
ScreenHelper.SaveScreenshot(TakeScreenshot());
}
}
You can view Demo report on our site
Please read Core instructions or this comment about opening report in Chrome
Anyone contributing is welcome. Write issues, create pull requests.
You can find it here for all packages.