offload
A flexible parallel test runner written in Rust with pluggable execution providers.
Features
- Parallel execution across multiple sandboxes
- Automatic retry for flaky tests
- Multiple providers: local processes or plugin scripts to invoke ephemeral compute
- Test discovery: pytest, cargo test, or custom commands
- JUnit XML reporting
Installation
Quick Start
- Initialize a config file:
- Run tests:
Configuration
Create a offload.toml file in your project root.
Core Settings
[]
= 4 # Number of parallel sandboxes
= 300 # Timeout per test
[]
= "test-results"
= true
= "junit.xml"
Test Discovery
pytest
[]
= "pytest"
= ["tests"]
= "python3"
= "not slow" # Optional: filter by markers
= 2 # Optional: retries for failed tests (default: 0)
Cargo Test
[]
= "cargo"
= "my-crate" # Optional: for workspaces
= ["feature1", "feature2"]
= false
Generic (Custom)
[]
= "generic"
= "find tests -name 'test_*.py' | xargs -I {} basename {}"
= "pytest {tests} -v"
The {tests} placeholder is replaced with discovered test names.
CLI Commands
# Run all tests
# Run with more parallelism
# Discover tests without running
# Validate configuration
# Initialize new config
Example Configurations
Example configurations have been provided in the root of this repo. See offload-*.toml for examples.
Testing
Use the project to test itself with:
cargo run -- -c offload-modal.toml run
(Requires valid Modal API key)
License
All Rights Reserved. See LICENSE for details.