Running Tests
TestDriver works with Vitest’s powerful test runner.Run All Tests
*.test.js, *.test.mjs, or *.spec.js.
Run with Coverage
coverage/ directory.
Coverage requires the
@vitest/coverage-v8 package. Install it with npm install -D @vitest/coverage-v8.Run Specific Tests
Filter Tests by Name
--grep flag filters tests by their name (the string passed to it() or test()). Only tests whose names match the pattern will run. Supports regex patterns for complex matching.
Run Tests in a Folder
Parallel Execution
TestDriver runs each test in its own cloud sandbox, enabling true parallel execution. Run your entire test suite in minutes instead of hours.Control Concurrency
--maxConcurrency flag limits how many tests run simultaneously. This should match your TestDriver license slots to avoid failures from exhausted slots.
Thread Configuration
--pool=threads— Uses worker threads for test isolation--minThreads— Minimum number of threads to keep alive (reduces startup overhead)--maxThreads— Maximum threads to spawn (limits resource usage)
License Slots
Your TestDriver plan includes a set number of license slots that determine how many tests can run simultaneously. Each running test occupies one slot—when the test completes and the sandbox is destroyed, the slot is immediately available for the next test.View your available slots at console.testdriver.ai. Upgrade anytime to increase parallelization.
Configuring Concurrency
SetmaxConcurrency in your Vitest config to match your license slot limit:
vitest.config.mjs
Why Parallelization Matters
| Test Suite | Sequential (1 slot) | Parallel (5 slots) | Parallel (10 slots) |
|---|---|---|---|
| 10 tests @ 2min each | 20 min | 4 min | 2 min |
| 50 tests @ 2min each | 100 min | 20 min | 10 min |
| 100 tests @ 2min each | 200 min | 40 min | 20 min |
View Plans & Pricing
Compare plans and find the right level of parallelization for your team.
Vitest UI
Use Vitest UI for interactive debugging:--ui flag launches a web-based interface for managing your test suite. Unlike vitest run, this starts in watch mode by default.
Open http://localhost:51204 to see:
- Test file tree — Browse and navigate your test structure
- Test status and duration — See pass/fail states and timing at a glance
- Console output — View logs and errors inline with each test
- Re-run individual tests — Click to re-execute specific tests without restarting
- Filter and search — Quickly find tests by name or status
Test Reports
After running tests, view detailed reports and video replays at console.testdriver.ai. Reports include:- Video replays - Watch exactly what happened during each test
- Screenshots - See the state at each step
- Timing breakdown - Identify slow operations
- Error details - Debug failures with full context

