(C#) 创建单元测试(Unit Test).

在VS2012中的右键中没有发现"Create Unit Test" 选项,原来需要安装个补丁:

https://visualstudiogallery.msdn.microsoft.com/45208924-e7b0-45df-8cff-165b505a38d7?SRC=Home

 参考:

http://www.visualstudio.com/en-us/get-started/create-and-run-unit-tests-vs.aspx

补丁安装好后,就可以在程序中的Method上面右击并创建UnitTest

在VS2102的菜单中选择 Test -> Windows-> Test Explorer. 就可以运行单元测试了。

单步调试

In VS2012 We can do debug step by step by putting a Break Point in a Specific Test Method. After Go to Menu > Test > Debug > Selected Tests Or All Test. No you should able to debug

原文地址:https://www.cnblogs.com/fdyang/p/4167761.html