Installation
Packages
Swarmdriver ships as four packages under the @caps scope. Install what you use.
| Package | What it is | Install it when |
|---|---|---|
@caps/core | buildWdioConfig(), the config matrix, helpers, and the provider registry | Always |
@caps/providers | Cloud-grid implementations (Sauce Labs) | Running anything against a cloud grid |
@caps/reporters | WebdriverIO reporters: spec, junit, ReportPortal, Sauce job comments | Wiring reporters yourself (@caps/core already pulls this in) |
@caps/cli | swarm-* binaries: Sauce REST CLI plus pinned wdio/appium/allure proxies | Using the CLI tooling |
- pnpm
- npm
- yarn
- bun
pnpm add -D @caps/core # local only
pnpm add -D @caps/core @caps/providers # + cloud grids
npm install --save-dev @caps/core
npm install --save-dev @caps/core @caps/providers
yarn add -D @caps/core
yarn add -D @caps/core @caps/providers
bun add --dev @caps/core
bun add --dev @caps/core @caps/providers
swarmdriver package@caps/core ships no providers. If you use remote: 'saucelabs', add a bare
side-effect import of @caps/providers — otherwise buildWdioConfig() returns
undefined with no error. See Quick Setup and
Providers.
Requirements
| Version | Needed for | |
|---|---|---|
| Node.js | ≥ 20 | Everything (engines.node on all packages) |
| WebdriverIO | 9.x | Everything |
| Appium | 2.x | Native apps and local mobile browsers |
Local mobile testing also needs whatever the platform requires — Android SDK plus an AVD, or Xcode plus a simulator runtime. Chromedriver, geckodriver and safaridriver are managed by WebdriverIO's own driver services for local desktop browsers.
Cloud runs need no local drivers at all — just SAUCE_USERNAME and
SAUCE_ACCESS_KEY.
Quick Setup
Create wdio.conf.js in your project root:
// The bare import registers cloud providers (e.g. 'saucelabs') into
// @caps/core's registry. Required for remote: 'saucelabs'; harmless otherwise.
import '@caps/providers'
import { buildWdioConfig } from '@caps/core'
export const config = {
...buildWdioConfig({
envs: process.env,
remote: process.env.WDIO_REMOTE || 'local',
scope: process.env.WDIO_SCOPE || 'browser',
metal: process.env.WDIO_METAL || 'desktop',
framework: 'jasmine',
}),
specs: ['./test/specs/**/*.spec.js'],
}
buildWdioConfig() returns specs: [] — it builds capabilities and services,
not a spec glob. Spread the result and add your own.
Then run:
wdio run wdio.conf.js # local desktop browsers
WDIO_METAL=device wdio run wdio.conf.js # local mobile browsers
WDIO_SCOPE=app wdio run wdio.conf.js # local native apps
WDIO_REMOTE=saucelabs wdio run wdio.conf.js # Sauce Labs
Next: Quick Start for a first passing test, or Examples for the environment each target needs.