The process to associate an automated test with a test case is:
1. Create a test project containing your automated test. What types of tests are supported?
2. Check your test project into an Azure DevOps or Team Foundation Server (TFS) repository.
3. Create a build pipeline for your project, ensuring that it contains the automated test. What are the differences if I am still using a XAML build?
4. Use Visual Studio Enterprise or Professional 2017 or a later version to associate the automated test with a test case as shown below. The test case must have been added to a test plan that uses the build you just defined.
Reference:
https://docs.microsoft.com/en-us/azure/devops/test/associate-automated-test-with-test-case