How can I retrieve TestRunResults via the REST API?

Hi everyone,

I’m building an external QA dashboard using the public Testiny REST API, and I need to retrieve detailed TestRunResults (i.e., the execution results of test cases inside test runs).

So far, I was able to:

  • Retrieve TestRuns using /api/v1/testrun/find

  • Retrieve TestCases using /api/v1/testcase/find

However, I could not find any documented REST endpoint that directly exposes the TestRunResult entity (the relation between testcases and testruns that contains fields such as result_status, assignee, execution timestamps, etc.).

My questions:

  1. Is there a public REST endpoint that returns TestRunResults as entities?

  2. If not, what is the recommended approach to retrieve execution-level data via the public API?

  3. Is there a way to expand TestRunResults using the map parameter in /testrun/find?

  4. What is the correct entity name (if supported) for mapping execution results?

My goal is to compute metrics such as:

  • Pass rate per project

  • Failure trends over time

  • Execution volume by user

  • Health score per module

I want to ensure I’m using only supported and documented API endpoints.

Thanks in advance for any clarification!

Hi and welcome to the Testiny forum!

There’s no separate endpoint, because you can use either the test case or test run endpoint with a map operation.
Using the /api/v1/testcase/find will usually be what you’re looking for, because it will give you back both the test case information and the results in the specified test run (RUN_ID in the following example):

POST /api/v1/testcase/find
{
    "idOnly": true,
    "map": {
        "entities": ["testcase", "testrun"],
        "filter": { "testrun_id": RUN_ID }
    } 
}

In this example, I omit detail information for the test cases (i.e. title, steps, …) to make the call more efficient. Omit the idOnly parameter to include that data.

There’s also a more efficient way using the statistics API in Testiny, but it’s unfortunately quite complex and thus not public for now. There’s a post that gives some examples, though:

Hope this helps!

Best regards,
Alex