Visual Studio 2017 and 2019 allow the implementation and usage of the Test Studio test lists in the plugin. This article describes the specifics of how to create and maintain the test lists in the project in Visual Studio.
There test lists can be two types as well - Static and Dynamic.
- A Static Test List contains a fixed, predetermined list of tests.
- A Dynamic Test List contains a list of tests that is dynamically generated upon execution based on test properties.
Note! Test lists in Visual Studio can only execute web or WPF functional tests.
A test list file has the extension *.aiilist and can be added in a Visual Studio project under a predefined folder named TestLists - this folder exists in each new project.
Right click on the TestLists folder and choose Test Studio Test List or Test Studio Dynamic Test List from the Add section sub-menu.
Choose a meaningful name for the test list and ensure the correct item from the item list is selected. Confirm the test list creation with the Add button.
The test list file will be listed under the TestLists folder.
Build the solution (press F6) and all test list files will appear in the Test Explorer available for execution.
Ensure you are using Test Studio with minimum version 2019.3 and create a new Test Studio project in Visual Studio 2017 or 2019. In the Solution Explorer you can add test list files under the folder named TestLists.
Once you upgrade Test Studio to minimum version 2019.3 and open an existing project, you will be prompted with a message, that the project needs to be upgraded as well. Once the upgrade is done and the project is loaded, you will need to include the TestLists folder in the solution.
To do that select the Test Studio project in the Solution Explorer and click the Show All Files button.
Now all files from the project root folder will be listed in the Solution Explorer. Right click the TestLists folder and select Include In Project.
Again click the Show All Files button to hide the other files. Save and reopen the solution to apply the changes. Now the TestLists folder can be used to add test list files in it.
Once a test list file is added into the TestLists folder, double click it to choose the test files to add in it.
Save the test list file to apply the changes and execute the test list from the Test Explorer in Visual Studio.
Once a test list file is added into the TestLists folder, double click it to craft the rules to filter, upon specific criteria, the test files to add.
The rules can be built upon the specific test properties..
Note! Each time you run a dynamic test list, the project is being queried and only the tests, which meet the criteria of the rules, are executed.
See also: You can find further interesting details in the following in-depth look at Dynamic Test Lists.
To change any of the Test List settings in Visual Studio, use the gear icon in the upper right corner in each test list.
To execute the designed test lists in Visual Studio, you can use the different Run options in Visual Studio Test Explorer.