Rest API to get all test occurances for a project
I want to get test occurrences for all projects that we responsible for. The end goal is to report how many tests are running and put it into a matrix for reporting elsewhere.
So far, I know I can get all projects using:
https://teamcity_server/app/rest/buildTypes
or
from which I can get all the builds using:
https://teamcity_server/app/rest/buildTypes/id:foo/builds
But I would really like to make one API call, not many to get the TestOccurrances data bundled or included with last call shown above.
Is this possible?
Please sign in to leave a comment.
Hi,
finding test occurrences of a project is described in our REST API documentation: https://confluence.jetbrains.com/display/TCD18/REST+API#RESTAPI-BuildproblemsTestsTestsandBuildproblems
That still didn't help. That still only gets one test result at a time.
It won't allow this:
`app/rest/testOccurrences`
Hi Christopher,
while "app/rest/testOccurrences" is not allowed, passing a locator to a project or a test will give all occurrences of that test, not just one.
You can use the build:(project:<project_id>) locator to get all tests of a project.