Skip to main content

WebdriverIO WebdriverIO Reporter

Send your WebdriverIO test results directly to TestPig.io with our dedicated reporter.

Perfect Match

WebdriverIO + TestPig.io = Comprehensive end-to-end test reporting!

Quick Installation ⚡

npm install @testpig/webdriverio-reporter --save-dev

Configuration 🛠️

Step 1: Add the Reporter to Your Configuration File (Required)

First, add the TestPig.io reporter to your wdio.conf.js:

// wdio.conf.js
exports.config = {
// ...other WebdriverIO configurations
reporters: [
['@testpig/webdriverio-reporter']
],
}

Step 2: Point Reporter to TestPig

Set these environment variables for maximum flexibility:

export TESTPIG_PROJECT_ID=your-project-id
export TESTPIG_RUN_ID=your-run-id # Optional
export TESTPIG_API_KEY=your-api-key

Your WebdriverIO config remains clean with just the reporter definition as shown above.

Method 2: Configuration File Options

Alternatively, specify credentials directly in your wdio.conf.js:

// wdio.conf.js
exports.config = {
// ...other WebdriverIO configurations
reporters: [
['@testpig/webdriverio-reporter', {
projectId: 'your-project-id',
runId: 'your-run-id', // Optional
apiKey: 'your-api-key'
}]
],
}

Using It Is a Breeze 🌬️

Run your WebdriverIO tests as usual:

npx wdio run wdio.conf.js

That's it! Your results will magically appear in your TestPig.io dashboard.

Awesome Features You'll Love ❤️

  • Detailed Reporting: Every step beautifully documented
  • Screenshot Integration: Visual evidence for failures
  • Browser Information: Complete browser and capability details
  • Multi-spec Support: Handle complex test suites with ease
  • Framework Flexibility: Support for Mocha, Jasmine, and Cucumber

Configuration Options At-a-Glance 📋

OptionWhat It DoesRequired?
projectIdLinks results to your TestPig.io project✅ Yes
runIdGroups tests under a single run identifier❌ No
apiKeyYour secure access key to TestPig.io✅ Yes
includeScreenshotsInclude screenshots for failures (default: true)❌ No
includeLogsInclude browser logs (default: false)❌ No
Want More Options?

Check our Best Practices guide for advanced configuration strategies.

Docker Usage 🐳

Running WebdriverIO tests in Docker? TestPig makes it seamless with automatic git detection:

# Simple Docker usage with proper git info
docker run --rm $(npx testpig-git-env) my-webdriverio-image

The testpig-git-env utility automatically detects your CI environment and provides proper git information to Docker containers.

Complete Docker Guide

For comprehensive Docker setup, CI/CD examples, and troubleshooting, see our Docker Usage Guide.

Getting Help

If you encounter issues with the WebdriverIO reporter: