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

const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
});

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>"
}

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 MultiStatePromptPlaygroundSnapshot

result_explanation
string | null

Explanation of the test result