Skip to main content

Installation

Packages​

Swarmdriver ships as four packages under the @caps scope. Install what you use.

PackageWhat it isInstall it when
@caps/corebuildWdioConfig(), the config matrix, helpers, and the provider registryAlways
@caps/providersCloud-grid implementations (Sauce Labs)Running anything against a cloud grid
@caps/reportersWebdriverIO reporters: spec, junit, ReportPortal, Sauce job commentsWiring reporters yourself (@caps/core already pulls this in)
@caps/cliswarm-* binaries: Sauce REST CLI plus pinned wdio/appium/allure proxiesUsing the CLI tooling
pnpm add -D @caps/core # local only
pnpm add -D @caps/core @caps/providers # + cloud grids
Upgrading from the single 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​

VersionNeeded for
Node.js≥ 20Everything (engines.node on all packages)
WebdriverIO9.xEverything
Appium2.xNative 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.