0
votes

I'm looking for a TFS API request to fetch all test suites (ids) that contains a certain test case.

Using the example form the TFS API page: https://www.visualstudio.com/en-us/docs/integrate/api/test/suites

https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/test/suites?testCaseId=341&api-version=2.0-preview

... I get the response: 404 Page not found (filled with my server and project etc.)

Is the example by Microsoft wrong? Or is there another way to get all suites for a test case (not using the .NET way)?

1
Could you access TFS collection in the browser using the following URL:fabrikam-fiber-inc.visualstudio.com/DefaultCollection with the account running rest api?PatrickLu-MSFT

1 Answers

1
votes

Update

You need to use the url without {project}. Seems the sample in the link is also lacking {project}

GET https://fabrikam-fiber-inc.visualstudio.com/DefaultCollectio‌​n/_apis/test/suites?‌​testCaseId=341&api-v‌​ersion=2.0-preview

However the API is including the project. Not sure if it's a content issue. Will double confirm and update to you.


Since the error is 404 Page not found, please double check if you are using the wrong url(such as with an extra space). Try to change a test case ID, double confirm there are test suits under the test case. You could also use postman to give a test with the API.