Use VS2015 (c #) for unit testing, display test results and view code coverage,
Refer to the following link for the process of creating a test:
Http://www.cnblogs.com/libaoquan/p/5296384.html
(1) how to use VS2015 to view test results
Problem description: run the unit test with VS2010. The following test result window is displayed.
VS2015 only has the following results:
After searching for relevant information, it is found that VS2010 will automatically generate this. trx file, which is the test report when it is opened.
The trx file is not automatically exported after VS2012.
You can use vstest.lele.exe to output the test results.
The parameters in the command line are described as follows:
1: full path of vstest.lele.exe; 2: Full path of the unit test DLL; 3:/Logger: trx, which indicates output of the trx file;
Run the following command to display the path of the trx result file:
(2) How to Use VS2015 to analyze code coverage
View code coverage results
Note: VS2015 Enterprise version is currently used.
VS2015 Community does not provide the code coverage analysis function.
Recently, we need to use VS2015 for unit tests and output the test results. You are welcome to discuss them together.