1, Javaweb in the JMeter, Jacoco, Ant, Badboy and other ways to integrate test code coverage, C # code coverage how to test it? The VS2013 IDE itself does not have the tools to integrate the tests, and the following describes the unit tests and code coverage tests for C # code in VS2013.
2, the current vs can be integrated test tool has Xunit, Nunit,xunit is the new test tool, Xunit is already hosted on Git, but still provide download on CodePlex. The following links are available:
a,http://xunit.codeplex.com/
B,https://github.com/xunit/xunit
3, There are several ways to integrate the tools:
A,vs: tools-"extensions and updates-" online-"search xunit and download the installation,
b, download the xunit.runner.visualstudio-***** and run the test tool into the system's vs.
4, how to use Xunit?
Xunit has three kinds of tests: Unit Test, Window test, Web test, Inherit good xunit, you can create a new test project under the solution of the project under test and select the required test project.
Only the functionality of the unit test is used again.
, ClassLibrary1 is the project to be tested (the unit test appears to be valid only for the class Library project), UnitTestProject1 is the test Project project, and the code is the test class and the test method.
5, Code Coverage analysis?
Testing requires the introduction of ClassLibrary1 engineering in UnitTestProject1,
The cursor rests on the test method body, right-click to run the test item, the test method will run, right-click the test method of the test window click Code Coverage Analysis to perform coverage analysis. The schematic is as follows:
6, References:
Http://www.cnblogs.com/ShaYeBlog/p/4072100.html
Official documents:
Https://msdn.microsoft.com/en-us/library/ms182532.aspx
(Original made by the small size of the cute, allow reprint)
VS2013 Unit test and Code Coverage analysis--xunit