Run specific unit test in Visual Studio

前端 未结 5 2225
余生分开走
余生分开走 2021-02-11 12:29

I have dozens of unit tests, and I\'d like to fix the code I am working on now, but every time I run the tests it takes over 30 seconds to run every unit test (I think reflectio

5条回答
  •  鱼传尺愫
    2021-02-11 12:43

    First, click somewhere inside the TestMethod you want to run, or highlight multiple methods. You can also click on the class or namespace if you want to run all TestMethods within that class/namespace.

    Using The Test Tools Toolbar

    1. Make sure the Test Tools Toolbar is visible (View → Toolbars → Test Tools).

    Using The Test Menu

    Run: Test → Run → Tests in Current Context

    Debug: Test → Debug → Tests in Current Context

    Using Shortcuts

    Run: Ctrl+R,T

    Debug:Ctrl+R,Ctrl+T

提交回复
热议问题