Skip to main content
Start the app you want to test with a provision method. Call one at the beginning of each test.
Every provision method:
  • Launches or installs the app in the sandbox. The Chrome methods also wait until Chrome is ready.
  • Starts the Dashcam recording, unless you turned it off with dashcam: false.
  • Does nothing when the client was created with reconnect: true, because the app is already running.

chrome(options)

Opens Chrome at a URL.
ProvisionChromeOptions
Chrome also records the site’s network traffic in the Dashcam replay.

chromeExtension(options)

Opens Chrome with an extension loaded.
ProvisionChromeExtensionOptions
required
Pass either extensionId or extensionPath. It throws if you pass neither.
From the Chrome Web Store:
From source:

vscode(options)

Opens VS Code, optionally with a folder and extensions.
ProvisionVSCodeOptions

installer(options)

Downloads a file into the sandbox, installs it, and returns the downloaded file’s path.
ProvisionInstallerOptions
required
TestDriver picks the install method from the file extension: Other file types are downloaded but not installed.
Install a desktop app and start it:

electron(options)

Opens an Electron app that’s already in the sandbox.
ProvisionElectronOptions
required

dashcam(options)

Starts the Dashcam recording with your own settings. The other provision methods start it for you, so call this only to change the log file, the log name, or the recording’s title.
ProvisionDashcamOptions

Complete example

tests/extension.test.mjs
  • Client & connection: create and connect the client
  • exec(): run commands in the sandbox, for example to fetch files before provisioning
  • Dashcam: how runs are recorded
  • Examples: complete tests that install and launch apps