saucectl — the Sauce Labs test orchestrator CLI — to run Puppeteer tests directly from your existing Puppeteer project.
- Don't have Puppeteer tests but want to try? The Puppeteer Demo Repo includes a sample project structure, working configuration file, and sample Puppeteer test so you can get up and running in less than 10 minutes!
- Already running Puppeteer? Let
saucectlrun your tests in Docker and then publish the results in your Sauce Labs account, where you can easily analyze 30 days worth of test results and data analytics.
What You'll Need
- A Sauce Labs account (Log in or sign up for a free trial license)
- Your Sauce Labs Username and Access Key
- Node.js to use the NPM package manager
- A GitHub account
- Docker For now, Puppeteer is only supported for local testing.
Ensure the Docker daemon is running (e.g.,
docker info works in your terminal / command prompt)
Step 1: Install
npm install -g saucectl
Step 2: Link Your Sauce Labs Account
saucectl requires access to a valid Sauce Labs account.
Use Environment Variables
saucectl detects your Sauce Labs credentials environment variables and prioritizes them over values in the
credentials.yml file when both are present. If you have set them, you may skip this step. Not sure if you have them set? Run the following command to check:
If a value is returned for both variables, they are set.
Enter your Sauce Labs Username and Access Key at the prompts.
Step 3: Clone the Puppeteer Demo Project
git clone https://github.com/saucelabs/saucectl-puppeteer-example.git
git clone email@example.com:saucelabs/saucectl-puppeteer-example.git
Step 4: Run Tests
Navigate to the root of the Puppeteer project you just cloned, then use the
run command to execute the sample test included with the
The console displays the executing tests, distinguishing which mode is running.
The results and test assets are available immediately following test completion in your Sauce Labs account.