Run specific unit test in Visual Studio

前端 未结 5 1206
误落风尘
误落风尘 2021-02-11 11:58

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:49

    Windows: Run unit tests with Test Explorer

    Use Test Explorer to run unit tests from Visual Studio or third-party unit test projects. You can also use Test Explorer to group tests into categories, filter the test list, and create, save, and run playlists of tests. You can debug tests and analyze test performance and code coverage. more…

    1. Select one or more tests in Test Explorer
    2. right-click → Run Selected Tests or Debug Selected Tests


    Mac: Run unit tests from Unit Test Pad or Text Editor

    Option 1: Unit Test Pad

    View → Pads → Unit Tests

    Test Write high-quality code with testing tools. Visual Studio for Mac’s integrated test runner helps you run and debug unit tests and automated UI tests. more…

    Select one or more tests, right-click, Run Test or Debug Test.

    Option 2: Text Editor Unit Test Integration

    Visual Studio → Preferences → Text Editor → Source Analysis
    ☑ Enable text editor unit test integration

    You can directly run a single test from directly from a test source file,

提交回复
热议问题