The Test Explorer in Visual Studio discovers and runs unit tests from Visual Studio or third-party test projects, including Test Studio tests and test lists.
In this article you can find useful details for running the Test Studio tests from the Test Explorer:
- Open Test Explorer and view Test Studio tests and test lists
- Group Test Studio tests and test lists in Test Explorer
- Run Test Studio tests and test lists in Test Explorer
- Test Studio settings for Test Explorer test runs
If the Test Explorer pane is not opened in your Visual Studio, you can access this as follows:
- in Visual Studio 2015 and 2017 - Test -> Windows -> Test Explorer;
- in Visual Studio 2019 and later - Test -> Test Explorer;
- or use keyboard shortcut Ctrl + E, T.
The Test Studio tests and test lists are listed in the Test Explorer automatically when the project is opened. To reflect any recent changes in the tests and test lists, you need to build/rebuild the Visual Studio project.
You can use Test Explorer to group tests into categories, filter the list of tests, and create, save, and run playlists of tests. There are few different options to group the test files and what makes sense in the context of Test Studio test project is to use custom grouping starting with either Namespace or Project, and use Class and State as sub-filters in the desired order.
To execute the test files from Test Explorer, use the Run... buttons and their available options.
To reflect any recent changes in the listed tests in Test Explorer, you need to build or rebuild the project before starting the test run.
The execution of Test Studio tests from the Test Explorer uses a set of default settings. To be able to modify these, you need to add a *.testsettings file in the solution. This file allows you to apply changes in the test run options like timeouts, executing browser, etc.
Test Studio test list files are using their own settings when executed from Test Explorer.