简体   繁体   中英

C# Code Coverage with TFS

I know there are several options in regards to code coverage. I am looking for something that could be used on developers machines as well as generate a code coverage report during a build process (CI). We are currently running TFS.

Does VS2015 code coverage tool work with NUnit tests? https://msdn.microsoft.com/en-us/library/dd537628.aspx

Can something from Microsoft be used for the purposes specified above? Or would I have to invest in dotCover or NCover?

You can run code coverage on NUnit tests using the " NUnit Test Adapter " (which is a free download) through VS and TFS. In fact you can run it using any test framework that has an extension adapter.

Here is some info on getting it right in TFS build:

http://www.codit.eu/blog/2015/03/18/continuous-integration-with-javascript-nunit-on-tfsbuild-part-3-of-3-/

http://www.codewrecks.com/blog/index.php/2015/03/16/running-nunit-tests-in-a-tfs-2015-build-vnext/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM