How to: Run Tests from Microsoft Visual Studio
https://msdn.microsoft.com/en-us/library/ms182470.aspx
Running Automated Tests in Visual Studio
Visual Studio provides different ways to run tests. You can choose the way that best suits your current needs:
-
Run Tests From Test Explorer. You can run automated tests including unit, coded UI, ordered, and generic in your solution from Test Explorer. Test Explorer easily lets you run and monitor the status of all the automated tests in your solution.
-
Run load tests from the load test editor. Load tests and web performance tests are run from either the Load Test Editor, the Web Performance Test Editor, or from the Visual Studio Enterprise LOAD TEST menu. For more information, see Running Load and Web Performance Tests.
-
Run Tests From Your Source Code Files. By using the keyboard, you can run tests from any text-based file in your solution. In particular, you can run tests while editing a file that contains your code under test. This lets you change source code and immediately test it without using a window or a menu.
-
Run Tests From Files in Your Test Code Files. By using the mouse or the keyboard, you can run tests from the file that contains your test code. This lets you change a test and then run it immediately without using a window or a menu.
TestExplorer在菜单中的位置Test-->Windows-->TestExplorer
To run tests from Test Explorer
-
In Test Explorer, choose Run All. Or, select the tests you want to run, right-click, and then choose Run Select Tests.
The automated tests will run and indicate if they passed or failed.
You can also choose the drop-down list under Run for other options including Run Failed Tests, Run Not Run Tests, Run Passed Tests,Repeat Last Run, and Analyze Code Coverage.
To view Test Explorer from the Test menu, point to Windows and then choose Test Explorer.
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2015-01-12 C#中将一个引用赋值null的作用
2015-01-12 关于C#中的垃圾回收
2015-01-12 触发事件,检查是否注册过事件的方法