0

I am trying to get List of tests as defined here.https://confluence.jetbrains.com/display/TCD8/REST+API#RESTAPI-Tests But I can't get the list of test names from myteamcity/app/rest/testOccurrences?locator=buildType:(id:1140)]

Is there another way to get those List of passed/failed tests?

1 Answers1

1

I know that long time has past since this question, but I accidentally stumbled upon it so here is the answer if someone else has a similar problem.
If I understood the Teamcity documentation correctly you can't use buildType with Tests. Supported locator is actually id of the exact build: Rest API Tests

But what you can do is get the list of builds for a buildType:

http://myTeamCity:100/guestAuth/app/rest/buildTypes/id:AXPL_TestDaily/builds/

And then use one of these build ids to get the tests:

http://myTeamCity:100/guestAuth/app/rest/testOccurrences?locator=build:(id:109)

Considering that you wrote integer as an id in your example, maybe you just already have the correct id, but you have resource path wrong as it is not id for buildType, but for build, because buildTypes have strings for ids.

Renesis
  • 881
  • 2
  • 9
  • 16