Skip to main content

Overview

The TestingAPI provides methods for running agentic tests with natural language instructions and managing test jobs.

Methods

execute()

Runs an agentic test with natural language instructions and optional structured output.

Parameters

TestOptions

TestConfig

Returns

Promise<TestResult> - Test execution result

TestResult

Examples

create()

Creates an async test job without waiting for completion.

Parameters

Returns

Promise<TestJob> - Test job information

TestJob

Example

getStatus()

Gets the status and results of a test job.

Parameters

Returns

Promise<TestJobStatus> - Detailed job status

TestJobStatus

Example

list()

Lists test jobs with optional filtering.

Parameters

ListTestsOptions

Returns

Promise<TestJobsList> - List of test jobs

TestJobsList

Examples

test()

Convenience method for simple tests.

Parameters

TestExecutionOptions

Returns

Promise<TestResult> - Test result

Example

login()

Convenience method for login testing.

Parameters

LoginCredentials

Returns

Promise<TestResult> - Login test result

Example

fillForm()

Convenience method for form filling tests.

Parameters

Returns

Promise<TestResult> - Form filling test result

Example

Advanced Usage

Structured Output Schemas

Complex Test Scenarios

Error Handling and Validation

Job Monitoring and Reporting

Best Practices

Instruction Writing

  1. Be specific: Use clear, actionable language
  2. Include context: Describe what success looks like
  3. Handle edge cases: Consider what might go wrong
  4. Use sequences: Number steps for complex tests
  5. Specify timeouts: For operations that might take time

Schema Design

Error Handling

Resource Management