Cypress Reporter
Send your Cypress test results directly to TestPig.io with our sleek, easy-to-use reporter!
Perfect Match
Cypress + TestPig.io = Beautiful end-to-end test reporting!
Quick Installation ⚡
npm install @testpig/cypress-reporter --save-dev
Configuration 🛠️
Step 1: Add the Reporter to Your Configuration File (Required)
First, add the TestPig.io reporter to your cypress.config.js
:
const { defineConfig } = require('cypress')
module.exports = defineConfig({
reporter: '@testpig/cypress-reporter',
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
})
Step 2: Point Reporter to TestPig
Method 1: Environment Variables (Recommended 👍)
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 configuration remains clean with just the reporter definition:
const { defineConfig } = require('cypress')
module.exports = defineConfig({
reporter: '@testpig/cypress-reporter',
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
})
Method 2: Configuration File Options
Alternatively, specify credentials directly in your cypress.config.js
:
const { defineConfig } = require('cypress')
module.exports = defineConfig({
reporter: '@testpig/cypress-reporter',
reporterOptions: {
projectId: 'your-project-id',
runId: 'your-run-id', // Optional
apiKey: 'your-api-key'
},
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
})
Using It Is a Breeze 🌬️
Run your Cypress tests as usual:
npx cypress run
That's it! Your results will magically appear in your TestPig.io dashboard.
Awesome Features You'll Love ❤️
- Visual Testing: Screenshots and videos automatically included
- Step-by-Step Reporting: Every action beautifully documented
- Failure Forensics: Pinpoint exactly what went wrong and where
- Browser Metadata: Know exactly which browser and version was tested
- Custom Commands: All your custom commands are tracked and reported
Configuration Options At-a-Glance 📋
Option | What It Does | Required? |
---|---|---|
projectId | Links results to your TestPig.io project | ✅ Yes |
runId | Groups tests under a single run identifier | ❌ No |
apiKey | Your secure access key to TestPig.io | ✅ Yes |
Want More Options?
Check our Best Practices guide for advanced configuration strategies.
Getting Help
If you encounter issues with the Cypress reporter:
- Check the Cypress Reporter GitHub repository for reporter-specific code issues
- Visit support.testpig.io for all bugs, feature requests, account or technical issues