Thinkx
Thinkx

Reputation: 129

Associate to test case is not enabled in Visual studio

I have a unit test project and I wrote my test methods there. I want to Associate my automation scripts with Test cases. But when I navigate to Test Explore tab and right click it will show "Associate with Test Case" but it is disabled. Can any one help me with this?

Upvotes: 4

Views: 2887

Answers (2)

Michael Blake
Michael Blake

Reputation: 2168

Make sure you are connected to DevOps / TFS (Under the Team Explorer, Connect)

Upvotes: 1

Alexander Tytarchuk
Alexander Tytarchuk

Reputation: 49

I had the same problem ("Associate to test case" disabled) because of using MSTest V2 in my Project (default in VS 2017).

To Enable "Associate to test case" just change MSTest V2 to MSTest V1 in your Project References:

MSTest V2: Microsoft.VisualStudio.TestPlatform.TestFramework

MSTest V1: Microsoft.VisualStudio.QualityTools.UnitTestFramework

enter image description here

Upvotes: 1

Related Questions