npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

wdio-lambdatest-service-sdk

v5.2.5

Published

WebdriverIO service and CLI for LambdaTest Appium & browser automation

Readme

WDIO LambdaTest CLI

CLI for running WebdriverIO and Appium tests on LambdaTest. Use the CLI to generate or update WDIO configs that connect to LambdaTest (auth, capabilities, test status updates).


Table of Contents


Features

  • CLI: Interactive config generator (wdio-lt generate / wdio-lt config), setup (wdio-lt setup), run (wdio-lt run), install (wdio-lt install), and REPL (wdio-lt repl) — all LambdaTest-focused.
  • Generate: Multi-select for test type, device type, platform, app/website; creates LT_Test/<name>.conf.js ready to run.
  • Setup: Injects LambdaTest service into existing *.conf.js files.
  • Run: Run LambdaTest WDIO config (default: config in LT_Test); pass WDIO options after --.
  • Install: Install wdio-lambdatest-service-sdk in the current project; optional --config <path> to run setup after install.
  • REPL: Start an interactive REPL session on the LambdaTest grid (credentials from env or LT_Test config).
  • Auth & status: Generated/setup configs use your credentials and report test status to the LambdaTest dashboard.

Installation

Works with Node.js (≥18) or Bun (≥1.0). No Bun required.

# Install the CLI (npm)
npm i wdio-lambdatest-service-sdk --save-dev

# Or with Bun
bun add wdio-lambdatest-service-sdk --dev

Peer dependency conflict (ERESOLVE)

If you see ERESOLVE unable to resolve dependency tree (e.g. WebdriverIO 5 or 6), use:

npm i wdio-lambdatest-service-sdk --save-dev --legacy-peer-deps

Or:

npm i wdio-lambdatest-service-sdk --save-dev --force

Generate Config (recommended)

Use the CLI to generate a WDIO config that is already wired to LambdaTest.

1. Install the CLI

npm i wdio-lambdatest-service-sdk --save-dev

2. Run the generator

npx wdio-lt generate

Or with Bun:

bunx wdio-lt generate

3. Follow the prompts

  • Test name – Build name and config filename.
  • LambdaTest Username & Access Key – Or use LT_USERNAME / LT_ACCESS_KEY.
  • Test type(s) – App Testing and/or Browser Testing (multi-select).
  • Device type(s) – Real / Virtual (multi-select).
  • Platform(s) – Android / iOS (multi-select).
  • What to test – Application (Native App) / Website (Mobile Browser) (multi-select).
  • App ID(s) – Per platform if native app (e.g. lt://proverbial-android).
  • Parallel threads – 0 for sequential.
  • Spec file path – e.g. ../specs/android-test.js (relative to config dir).

4. Output

  • Config: LT_Test/<TestName>.conf.js
  • Script in LT_Test/package.json: test:<TestName>

5. Run

cd LT_Test
npm run test:<TestName>

CLI Commands

| Command | Description | |--------|-------------| | wdio-lt generate | Interactively generate a new WDIO config for LambdaTest | | wdio-lt config | LambdaTest config wizard (same as generate) | | wdio-lt init | Alias for generate | | wdio-lt setup [path] | Inject LambdaTest service into existing WDIO config files | | wdio-lt run [configPath] | Run LambdaTest WDIO config (default: first config in LT_Test). Pass WDIO options after -- | | wdio-lt install | Install wdio-lambdatest-service-sdk in current project. Use -c/--config <path> to run setup after install; --yarn to use yarn | | wdio-lt repl [browser] | Start REPL on LambdaTest grid (default browser: chrome). Credentials from LT_USERNAME/LT_ACCESS_KEY or from LT_Test config | | wdio-lt --help | Show help | | wdio-lt --version | Show version |

Full usage (all commands)

With npx (Node.js):

# Show help and version
npx wdio-lt --help
npx wdio-lt -h
npx wdio-lt --version
npx wdio-lt -v

# Generate – create a new WDIO config (interactive)
npx wdio-lt generate
npx wdio-lt gen
npx wdio-lt init
npx wdio-lt config

# Setup – inject LambdaTest service into existing configs
npx wdio-lt setup
npx wdio-lt setup .
npx wdio-lt setup ./android-sample
npx wdio-lt setup ./path/to/your/project

# Run – execute LambdaTest config (default: LT_Test)
npx wdio-lt run
npx wdio-lt run LT_Test/MyTest.conf.js
npx wdio-lt run -- --spec ./specs/foo.js --watch

# Install – add LambdaTest service to current project
npx wdio-lt install
npx wdio-lt install --config ./android-sample
npx wdio-lt install --yarn

# REPL – interactive session on LambdaTest grid
npx wdio-lt repl
npx wdio-lt repl chrome
npx wdio-lt repl firefox

With Bun:

bunx wdio-lt --help
bunx wdio-lt --version
bunx wdio-lt generate
bunx wdio-lt config
bunx wdio-lt run
bunx wdio-lt install
bunx wdio-lt repl chrome
bunx wdio-lt setup
bunx wdio-lt setup ./android-sample

Using the installed binary (after npm i wdio-lambdatest-service-sdk --save-dev):

# From project root (node_modules/.bin in PATH)
wdio-lt --help
wdio-lt --version
wdio-lt generate
wdio-lt config
wdio-lt run
wdio-lt install
wdio-lt repl chrome
wdio-lt setup
wdio-lt setup ./android-sample

# Or via npm run (add to package.json "scripts")
npm run lt:generate    # "lt:generate": "wdio-lt generate"
npm run lt:run         # "lt:run": "wdio-lt run"
npm run lt:setup       # "lt:setup": "wdio-lt setup ./android-sample"

Alternative binary name (same CLI):

npx wdio-lambdatest generate
npx wdio-lambdatest setup ./android-sample

Legacy commands (backward compatible):

npx wdio-lambdatest-setup ./android-sample
npx wdio-lambdatest-generator

Try the CLI with the Sample Project

  1. Clone the sample repo
git clone https://github.com/LambdaTest/LT-appium-nodejs-webdriverio
cd LT-appium-nodejs-webdriverio
  1. Install the CLI
npm i wdio-lambdatest-service-sdk --save-dev
  1. Set credentials

Linux / macOS:

export LT_USERNAME="your_username"
export LT_ACCESS_KEY="your_access_key"

Windows (PowerShell):

$env:LT_USERNAME = "your_username"
$env:LT_ACCESS_KEY = "your_access_key"
  1. Generate a config and run
npx wdio-lt generate
cd LT_Test && npm run test:<TestName>

Or run the existing samples: see Steps to Run the Sample Project.


Steps to Run the Sample Project

After cloning LT-appium-nodejs-webdriverio and setting credentials:

Android

cd android-sample
npm install
npm run SingleAndroidApp
# or: npm run parallel

iOS

cd ios-sample
npm install
npm run single
# or: npm run parallel

Ensure configs point to the correct spec paths (e.g. ../specs/android-test.js) and include the LambdaTest service. Results appear in the terminal and on the LambdaTest App Automation Dashboard.


Specs Folder & Code Design

The sample repo uses a shared specs/ folder at the root. Use the same layout so generated configs can reuse specs.

Recommended layout:

LT-appium-nodejs-webdriverio/
├── android-sample/
├── ios-sample/
├── specs/              # Shared test specs
│   ├── android-test.js
│   ├── ios-test.js
│   └── ...
├── LT_Test/            # Generated configs (from wdio-lt generate)
└── package.json
  • Use paths like ../specs/android-test.js in configs under LT_Test or sample dirs.
  • When running wdio-lt generate, set the spec path to e.g. ../specs/android-test.js so the generated config uses the shared specs.

Setup Command

Use the CLI to add the LambdaTest service to existing WDIO configs:

wdio-lt setup ./path/to/your/project

This will:

  • Find *.conf.js files recursively.
  • Add the service configuration.
  • Set logLevel to error.
  • Comment out hardcoded credentials so env vars or service options are used.

Manual Configuration

If you prefer not to use the CLI, add the service to your wdio.conf.js:

const path = require('path');

exports.config = {
    logLevel: 'error',
    services: [
        [path.join(__dirname, 'node_modules/wdio-lambdatest-service-sdk'), {
            user: process.env.LT_USERNAME,
            key: process.env.LT_ACCESS_KEY
        }]
    ],
    // ...
};

Prefer using wdio-lt generate or wdio-lt setup so paths and specs are set correctly.


Troubleshooting

  • "Cannot read properties of null (reading 'launcher')" or "No specs found"
    Regenerate or fix the config with the CLI so the service path and spec paths are correct:

    • Run npx wdio-lt generate and use the new config, or
    • Run npx wdio-lt setup ./path/to/project to re-inject the service.
    • Ensure specs in the config point to existing files (e.g. ../specs/android-test.js from LT_Test).
  • ERESOLVE / peer dependency errors
    Install with --legacy-peer-deps or --force (see Installation).

  • Wrong or missing spec path
    When generating, use a path relative to the config file (e.g. ../specs/android-test.js). Re-run wdio-lt generate if needed.


Development

This package ships a CLI (wdio-lt) and a WebdriverIO service/launcher used by generated and setup configs.

Project structure

wdio-lambdatest-service/
├── bin/
│   ├── cli.js
│   ├── setup.js
│   └── generate-config.js
├── lib/cli/
│   ├── setup.js
│   ├── generate.js
│   ├── run.js
│   ├── install.js
│   ├── repl.js
│   └── style.js
├── src/
│   ├── launcher.js
│   └── service.js
├── index.js
└── package.json

Requirements

  • Node.js: >= 18.0.0
  • Bun: >= 1.0.0 (optional)

License

ISC