Charles Nichols
Charles Nichols

Reputation: 53

Is there a way to associate Automated tests to Test Cases in Azure DevOps using VS Code?

I've been looking for an extension for VS Code that will allow the "Associate Test Case" functionality provided with Visual Studio IDE and I have had no luck. Is there an extension that provides this functionality?

Visual Studio steps:

  1. Open Test Explorer
  2. Right click on a Test Case
  3. Click on Associate To Test Case

Screenshot:

VS Associate To Test Case

Upvotes: 5

Views: 2754

Answers (2)

Janusz Nowak
Janusz Nowak

Reputation: 2848

Check this extension that I have created https://github.com/JanuszNowak/janono.ado.testcase.associate.cli it allows associating in automatic manner. For now this is CLI, that you can run as vs-code task. Later I will create also dedicated Azure DevOps task. Visual Studio is not needed to run automatic association. Code sample:

namespace ExampleTestProject
{
    [TestClass]
    [janono.ado.testcase.associate.Organization("janono-pub")]
    public class UnitTest1
    {
        [TestMethod]
        [janono.ado.testcase.associate.TestCase(5)] //<---
        public void TestMethod1()
        {
            //yours test method content
            //...
            //
        }
    }
}

Upvotes: 2

Hugh Lin
Hugh Lin

Reputation: 19471

As far as I know, currently there is no such extension provided in the visual studio code to support the "Associate Test Case" function.

You could add your request for this feature on vscode UserVoice site The product team would provide the updates if they view it.

enter image description here

Upvotes: 1

Related Questions