Merge PartCover and NUnit action

To my knowledge tests are run twice when using code coverage:

  • NUnit action
  • PartCover action

My suggestion is to merge the two actions into one PartCover action. PartCover executes the NUnit to run the tests anyway and it could export the XML test results file. Here is how to do that:

  • Allow to specify (NUnit) test result output path for OpenCover: OpenCover.exe -targetargs:"C:\MyProject\MyProject.Test.dll --output=$Workspace$\Output\TestResults\testresults.xml"

The idea came from here: https://stackoverflow.com/questions...nunit-test.

My second suggestion for OpenCover action is to be able to skip C# auto properties:

-skipautoprops - Neither track nor record auto-implemented properties. That is, skip getters and setters like these: public bool Service { get; set; }

Hi JPollack,

We'll add the -skipautoprops property to the OpenCover action in the near future.

You can currently prevent running the unit tests twice by adding the -output parameter to the Targets Arguments field in the OpenCover action. This will generate a test results XML file. You can then use an Import NUnit Tests action to read the unit tests from the results file into Continua CI.

We agree that it would be easier if the functionality to read the unit tests were added to the OpenCover action. Likewise, additional fields would simplify adding an NUnit/XUnit/MSTest arguments to the targetargs. This is not a priority right now, but we will add an item to our to-do list to build these features into the Open Cover action at some point in the future.

It is nice to be heard :slight_smile:
Thanks for the suggestion to use the NUnit import action. I was just wondering what for the action is.