TeamCity report Nunit test results from Docker container



I am currently running a suite of integration Nunit tests inside a docker container. I can't seem to find any examples of how to get the output of Nunit tests to be picked up by Teamcity though. Is this possible without resorting to volume mounts etc, if so can anyone point me in the right direction?





Hi Andy,


what are you trying exactly? How are you running the build? What files are you looking for?


In order to get individual files, you can simply mark them as artifacts (in the "Artifact Paths" field of the build configuration) if you know their path. That will publish the files.


In order to obtain the full build results, if you are using any of the bundled runners, such as NUnit, the test results should be published automatically on the results page.


I think you should have solved your issue by now (it's been almost 4 years), but in case someone has the same issue, there are 2 things that need to be done.

First, you setup XML Report Processing for NUnit to watch for your Test results XML file; then, you add a build step after your docker build is finished, doing this:

  1. Create a (stopped) container with your image
  2. Copy the file from the container to the TeamCity workspace
  3. touch the file somehow to get its date updated to now.

Once you do this, the XML Report processor will pick up your file and add the test results report.




Please sign in to leave a comment.