Skip to main content

Overview

Test templates allow you to create reusable test configurations that can be invoked multiple times with different parameters. Templates are perfect for complex, long-running tests that need consistent execution and structured output.

Creating a Template

Template Components

Instructions

Instructions can be detailed and step-by-step:

Output Schema

Define structured output for consistent results:

Tags and Metadata

Invoking Templates

Basic Invocation

With Parameters

Create and Invoke in One Step

Managing Templates

List Templates

Update Templates

Delete Templates

Async Job Management

Check Job Status

List Jobs

Wait for Job Completion

Advanced Template Features

Parameterized Instructions

Use variables in your instructions:

Conditional Logic in Instructions

Template Categories

E-commerce Templates

User Authentication Templates

API Integration Templates

Best Practices

Template Design

  1. Modular instructions: Break complex tests into clear steps
  2. Comprehensive schemas: Define detailed output structures
  3. Error handling: Include error scenarios in instructions
  4. Timeouts: Set appropriate timeouts for long-running tests
  5. Parameterization: Use variables for flexible templates

Organization

Maintenance

Monitoring & Analytics

Troubleshooting

Common Template Issues

  1. Timeout errors: Increase timeout or simplify instructions
  2. Parameter not found: Check parameter names match template variables
  3. Schema validation: Ensure output matches defined schema
  4. Async job failures: Check job status and error messages

Debugging Templates

Template Validation