Skip to main content

Overview

The BatchAPI provides methods for efficiently processing multiple screenshots and tests with built-in concurrency control and error handling.

Methods

screenshots()

Processes multiple screenshots concurrently.

Parameters

ScreenshotRequest

BatchOptions

Returns

Promise<BatchScreenshotResults> - Batch screenshot results

BatchScreenshotResults

Examples

tests()

Processes multiple tests concurrently.

Parameters

TestRequest

Returns

Promise<BatchTestResults> - Batch test results

BatchTestResults

Examples

createTests()

Creates multiple async test jobs.

Parameters

Returns

Promise<BatchJobResults> - Batch job creation results

BatchJobResults

Example

Advanced Usage

Custom Batch Processing

Progress Tracking

Memory-Efficient Processing

Error Handling

Batch-Level Error Handling

Circuit Breaker Pattern for Batches

Performance Optimization

Optimal Concurrency

Resource Pooling

Best Practices

Batch Size Optimization

Monitoring and Alerting