Step 2: How to Associate the Test Cases
Test Plan works in Association with specific Visual Studio subscriptions.
After setting up a Test Plan, now you need to associate your test cases as well with the Test Plan. To perform the same, we must have a Visual Studio IDE installed in our local machine. Login with same credentials for Visual Studio as in Test Plan.
Follow the steps below to compelete the test case association:
Step 1: In your Visual Studio Code IDE, click on a sln file in a C# project.
NOTE : Login with the same credentials for Visual Studio as in the Test Plan.
![Image](/support/assets/images/step1-b15bd1802858210e33afacb8e58f8c94.png)
Step 2: Navigate to the Team Explorer view.
![Image](/support/assets/images/step2-c6f189422123a2f38d3d9d23bf50e707.png)
Step 3: Click the Home icon and pull down the list to the right of Home icon.
-
Select the Projects and My Teams >> Manage Connections.
-
Click on Manage Connections >> Connect to a Project.
![Image](/support/assets/images/step3-41a8a2c382a1894976c8d7c07ad835fc.png)
Step 4: Select your repository, click the right button of your mouse, and then click the Connect button.
NOTE : The connection might ask you to connect with GitHub; please provide access to GitHub as well.
![Image](/support/assets/images/step4-91aac048147f3b58c90be59f1b3b60e1.png)
Step 5: Once connected, click on the Test menu, then Test Explorer.
![Image](/support/assets/images/step5-f78eb4713bc2abcd95932cd7e3328cee.png)
Step 6: Inside the Test Explorer, select any test, right click and select Associate to Test Case.
![Image](/support/assets/images/step6-c75577e4641413c49ed02ccb90ad242f.png)
Step 7: Enter the Test Case ID, click on Add Association, and then click the Save button. This will associate the test with the Test Case ID in the Test Plan.
![Image](/support/assets/images/step7-9bf44fbca59d060bcd959c9d714dcfe6.png)
Step 8: You can check the associated test in test plan by hovering on three dots beside test case name and click on Open Test Case.
![Image](/support/assets/images/step8-06dbfee948144918176e6c2e6dae1c07.png)
Associated test cases will look like this:
![Image](/support/assets/images/step9-c538bb40cb1a99b45ef27c33b3e1589e.png)