# Test Lists in Visual Studio 2019 and Later

Visual Studio 2019 and later allows you to add and run the <a href="/automated-tests/test-lists/test-lists-standalone">Test Studio test lists</a> in the context of the Visual Studio project. Depending on the requirements there are two options of test lists, which you can add in the Visual Studio project - **Static** and **Dynamic**.

In this article you can find useful information on the below topics:

* [Test Lists in Visual Studio 2019 and Later](https://www.telerik.com/teststudio/documentation/automated-tests/vs-plugin/test-lists-in-vs-2017-2019#test-lists-in-visual-studio-2019-and-later)
  * [Create a Test List in Visual Studio Project](https://www.telerik.com/teststudio/documentation/automated-tests/vs-plugin/test-lists-in-vs-2017-2019#create-a-test-list-in-visual-studio-project)
  * [Add a Test List in an Existing Project](https://www.telerik.com/teststudio/documentation/automated-tests/vs-plugin/test-lists-in-vs-2017-2019#add-a-test-list-in-an-existing-project)
  * [Add Test Files to Static Test List](https://www.telerik.com/teststudio/documentation/automated-tests/vs-plugin/test-lists-in-vs-2017-2019#add-test-files-to-static-test-list)
  * [Add Test Files to Dynamic Test List](https://www.telerik.com/teststudio/documentation/automated-tests/vs-plugin/test-lists-in-vs-2017-2019#add-test-files-to-dynamic-test-list)
  * [See Also](https://www.telerik.com/teststudio/documentation/automated-tests/vs-plugin/test-lists-in-vs-2017-2019#see-also)
  * [Test List Settings in Visual Studio](https://www.telerik.com/teststudio/documentation/automated-tests/vs-plugin/test-lists-in-vs-2017-2019#test-list-settings-in-visual-studio)
  * [Execute Test List Files in Visual Studio](https://www.telerik.com/teststudio/documentation/automated-tests/vs-plugin/test-lists-in-vs-2017-2019#execute-test-list-files-in-visual-studio)

> **Note!**
> <br>
> <br>
> Test lists in Visual Studio **only execute functional tests** e.g. WPF, Desktop and web tests.

## Create a Test List in Visual Studio Project

A Test Studio 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 by default in each new project.

![TestLists folder in Solution explorer](https://www.telerik.com/teststudio/documentation/assets/27765a89aa64b62761c3a4847e38670f/fig1.png)

Right click on the **TestLists** folder and choose from the *Add* section sub-menu any of the options **Test Studio Test List** or **Test Studio Dynamic Test List** .

![Add a test list file](https://www.telerik.com/teststudio/documentation/assets/8f05ffdca723054326637da3bee0df74/fig2.png)

Set a name for the test list and double check if the correct test list item from the list is selected. Confirm the test list creation by clicking the *Add* button.

![Name and create the test list file](https://www.telerik.com/teststudio/documentation/assets/baaf7c07a912a12def82a6f739153ad7/fig3.png)

The newly created test list is listed under the **TestLists** folder.

![Test list file listed under TestLists folder](https://www.telerik.com/teststudio/documentation/assets/0c501abb6d086c2dcac4c2e400d1b7c4/fig4.png)

Build the solution (press F6) and all test list files will appear in the Test Explorer available for execution.

![Test list files listed in Test Explorer](https://www.telerik.com/teststudio/documentation/assets/8a20216b25130f5c154da982e9ccba91/fig5.png)

## Add a Test List in an Existing Project

The Test Studio test lists in Visual Studio are implemented with Test Studio version 2019.3.xx. Thus, any project created with Test Studio prior this version requires some adjustment to enable the usage of test lists - the **TestLists** folder is not included in the solution for older projects and needs to be added manually.

Open the Test Studio project and choose the option **Show All Files** in the **Solution Explorer**.

![Show All Files for the TS project](https://www.telerik.com/teststudio/documentation/assets/42064c4ce8573e35faab54afe8beb0c1/fig6.png)

With this all items from the project root folder will be listed in the **Solution Explorer**. Select the **TestLists** folder and choose the  **Include In Project** option from the right click context menu.

![Include TestLists folder in TS project](https://www.telerik.com/teststudio/documentation/assets/915401d075ef10c7689dd7921bf3b9f8/fig7.png)

Click the **Show All Files** button again to toggle the view and **hide the other files** and folders. Save and reopen the solution to apply the changes. Now the **TestLists** folder can be used to add test list files in it as described [above](https://www.telerik.com/teststudio/documentation/automated-tests/vs-plugin/test-lists-in-vs-2017-2019#create-a-test-list-in-visual-studio-project).

## Add Test Files to Static Test List

Once a static test list file is added into the **TestLists** folder, double click this to open it. In this view you can choose the test files to include in the test list. All tests in the project are listed on the left side of the pane - you can use the arrows to move a file on the right side to include it in the test list.

![Add test to static list](https://www.telerik.com/teststudio/documentation/assets/fadc2e4ecdfa947965c3c54feefedbe8/fig8.png)

Save the test list file to keep the changes. The test list can be [executed](https://www.telerik.com/teststudio/documentation/automated-tests/vs-plugin/test-lists-in-vs-2017-2019#execute-test-list-files-in-visual-studio) from the **Test Explorer** in Visual Studio.

## Add Test Files to Dynamic Test List

Once a dynamic test list file is added into the **TestLists** folder, double click this to open it and craft the rules to filter the test files to add in the list.

![Add test to dynamic list](https://www.telerik.com/teststudio/documentation/assets/033615b419fa00be948b5094174c3c53/fig9.png)

This type of test list lets you choose the tests to include dynamically based on some of the <a href="/features/test-maintenance/test-properties-vs" target="_blank">test properties</a>. These, which you can rely upon, are the user-defined properties - Name, Owner, Path, Priority and the custom properties.

![Available properties to create rules](https://www.telerik.com/teststudio/documentation/assets/e200bf5d77a4efd1e0b4ef0cdc81ecc2/fig10.png)

Save the test list file to keep the changes. The test list can be [executed](https://www.telerik.com/teststudio/documentation/automated-tests/vs-plugin/test-lists-in-vs-2017-2019#execute-test-list-files-in-visual-studio) from the **Test Explorer** in Visual Studio.

> **Note!**
> <br>
> <br>
> Each time a dynamic test list run is initiated, all tests in the project get queried and only these, which meet the criteria of the rules, are included in the test list and executed.
> <br>
> <br>
> **Tip**
> <br>
> <br>
> You can find further interesting details in the following <a href="http://blogs.telerik.com/automated-testing-tools/posts/13-09-23/power-of-dynamic-test-lists" target="_blank">in-depth look at Dynamic Test Lists</a>.

## See Also

* <a href="http://blogs.telerik.com/automated-testing-tools/posts/13-09-23/power-of-dynamic-test-lists" target="_blank">In-depth look at Dynamic Test Lists</a>.

## Test List Settings in Visual Studio

<a href="/general-information/test-execution/test-list-settings" target="_blank">Test list settings</a> can be customized to fit the specific environment and customer requirements. In Visual Studio you can access these through the *gear* icon in the upper right corner when a test list file is opened.

![Test List Settings](https://www.telerik.com/teststudio/documentation/assets/04a1e3a5787d4b8003b38b56dbf59fc1/fig11.png)

## Execute Test List Files in Visual Studio

To execute the test lists in Visual Studio, you can use the different <a href="/general-information/test-execution/vs-test-explorer#run-tests-and-test-lists-in-test-explorer" target="_blank">Run options in Visual Studio Test Explorer</a>.
