0

I'm currently moving one of our projects to DNX (.NET Core now) and I was forced to update to nunit3. Because of other considerations, we run compile the test project as a console app with its own entry point, basically self-hosting the NUnit runner.

I now need to report the results to TeamCity via the XML Reporter, which doesn't seem to parse Nunit3 TestResults.xml files.

Any advice on how to work around this?

marius-O
  • 395
  • 3
  • 15

2 Answers2

1

The NUnit 3 console has the option to produce results formatted in the NUnit 2 style.

Use the option:

--result=[filename];format=nunit2

Docs: https://github.com/nunit/nunit/wiki/Console-Command-Line

Chris
  • 5,882
  • 2
  • 32
  • 57
0

To add to the answer above: NUnitLite inherits the --result CLI parameter which seems to do the trick.

Another option, which I went for in the end is using the --teamcity CLI parameter:

dotnetbuild --project:<path to project directory> -- --teamcity

which will integrate with TC's service messages. This will also do real-time updates.

marius-O
  • 395
  • 3
  • 15