Search code examples
resttfstestcasetfs-sdkazure-devops-rest-api

Creating a test case in tfs 2015 by rest api version 2.2


I'm trying to create a new test case at the TFS throw Postman by sending a PUT request with an application/json but get

"Message": "The requested resource does not support http method 'PUT'."

I tried to use X-HTTP-Method-Override but i get the same response. My api version is 2.2. How can I create a test case using this REST API version

This is the request:

 PUT http://server:port/{path_to_project}/_apis/test/Plans/{id}/suites/{id}/testcases/{id}?api-version=2.2

Solution

  • To create a Test Case, use the work item api, not the test case manegement api.

    The Shared Step and Test Case are work items and are created using the respective api. After creation you can use the test case management api to put the test cases into suites and plans.