testdriveroptionslisted
Install: claude install-skill testdriverai/testdriverai
<!-- Generated from options.mdx. DO NOT EDIT. -->
## Overview
You configure the SDK with an options object. You can pass the object in three places:
```javascript
// 1. Vitest hook (most common)
const testdriver = TestDriver(context, { os: "windows" });
// 2. Constructor
const testdriver = new TestDriver(apiKey, { os: "windows" });
// 3. Global plugin options in vitest.config.mjs
testdriver({ os: "windows" })
```
The hook merges the options in this order. A later source replaces an earlier source:
1. Default values
2. Environment variables (`TD_OS`, `TD_API_ROOT`, `TD_E2B_TEMPLATE_ID`)
3. Global plugin options
4. Options that you pass to the hook or the constructor
Options that you pass to [`connect()`](/client#connect) replace the constructor values for that connection only.
## Sandbox
These options control the virtual machine that runs your test.
<ParamField path="os" type="'linux' | 'windows'" default="linux">
The operating system of the sandbox. You can also set this with the `TD_OS` environment variable.
</ParamField>
<ParamField path="resolution" type="string" default="1366x768">
The screen resolution of the sandbox. Example: `'1920x1080'`. Custom resolutions are available only on Enterprise plans.
</ParamField>
<ParamField path="newSandbox" type="boolean" default="true">
Create a new sandbox for this run. Set to `false` to reuse a recent sandbox when one is available.
</ParamField>
<ParamField path="reconnect" type="boolean" default="false">
Reatt