Discussion

Ask a Question
Back to All

How Does One Get The Test Case Run Ids For A Newly Created Test Plan

I am trying to write an integration to record my test plan runs into the targetprocess system. However I am running into a road block when creating/recording the status of a test case.

I am calling the TestPlanRuns Endpoint with the following url/body.
Endpoint: "/api/v1/TestPlanRuns/?token={ApiToken}"
Body: {"TestPlan": {"Id": 3456}}

When I call this endpoint it starts a testplan and I get a response that has the TestPlanRunId for the TestPlanId that was passed in the request.
However, I do not get the TestCaseRunIds with their matching TestCaseIds for the newly created Run on the response.
I need this info to be able to record the status of each TestCaseId onto that test plan run.
Note: I have tried calling the EndPoint with the following Url like the documentation(https://dev.targetprocess.com/docs/api-v1-usecases-testing-module) has stated "/api/v1/TestPlanRuns?resultFormat=json&resultInclude=[Id,TestCaseRuns[Id,TestCase]]/?token={ApiToken}". However, I get an error when calling the endpoint like this.

Is there Something else I need to pass on the request to get this information or is there an endpoint I can call to get the pairing of TestCaseIds:TestCaseRunIds for a particular TestPlanRunId?