unit-testingvisual-studio-2017azure-devopsazure-devops-rest-api

How to create test cases in VSTS in a programmatic manner?


I have a unit test project for client side (angular) application written using jasmine framework.

In C# unit test projects, there is a possibility to link each test method with a test case in visual studio test explorer.

Since it's not possible to achieve the same for test methods/suites in unit test project for client side (angular) application which is written using jasmine framework, I was looking at the possibility of creating a tool to create test cases in VSTS by programming. And to map each client side unit test method to a test case in VSTS.

Can anyone help me with the API's and idea on how this can be done?


Solution

  • The REST API for Test Management is pretty extensive and documented clearly over at the VSTS documentation website.

    The API is separated into two parts:

    1. The Test Management API for creating Test Plans and Test Suites and to link items together.
    2. The Work Item API for creating and updating Test Cases (which are essentially just a work item).