Skip to main content
GET
/
get-test-run
/
{test_case_job_id}
JavaScript
import Retell from 'retell-sdk';

const client = new Retell({
  apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
});

const testCaseJobResponse = await client.tests.getTestRun('test_case_job_id');

console.log(testCaseJobResponse.test_case_definition_id);
{
  "test_case_job_id": "<string>",
  "status": "in_progress",
  "test_case_definition_id": "<string>",
  "test_case_definition_snapshot": {
    "name": "<string>",
    "response_engine": {
      "type": "retell-llm",
      "llm_id": "<string>",
      "version": 0
    },
    "user_prompt": "<string>",
    "metrics": [
      "<string>"
    ],
    "dynamic_variables": {},
    "tool_mocks": [
      {
        "tool_name": "<string>",
        "input_match_rule": {
          "type": "any"
        },
        "output": "<string>",
        "result": true
      }
    ],
    "llm_model": "gpt-4.1",
    "test_case_definition_id": "<string>",
    "type": "simulation",
    "creation_timestamp": 123,
    "user_modified_timestamp": 123
  },
  "creation_timestamp": 123,
  "user_modified_timestamp": 123,
  "transcript_snapshot": {},
  "result_explanation": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.retellai.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"

Path Parameters

test_case_job_id
string
required

ID of the test case job to retrieve

Response

Test case job retrieved successfully

test_case_job_id
string
required

Unique identifier for the test case job

status
enum<string>
required

Status of the test case job

Available options:
in_progress,
pass,
fail,
error
test_case_definition_id
string
required

ID of the test case definition used

test_case_definition_snapshot
object
required

Snapshot of the test case definition at time of execution

creation_timestamp
integer
required

Timestamp when the test case job was created (milliseconds since epoch)

user_modified_timestamp
integer
required

Timestamp when the test case job was last modified (milliseconds since epoch)

transcript_snapshot
object

Snapshot of the transcript generated during test execution. Can be either ConversationFlowPlaygroundSnapshot or RetellLlmPlaygroundSnapshot

result_explanation
string | null

Explanation of the test result