A visual regression testing dashboard for monitoring website changes across multiple platforms.
Crow Nest is a comprehensive visual regression testing system that automatically captures screenshots of websites and compares them against baseline images to detect visual changes. It provides a beautiful dashboard to monitor test results and manage multiple entities.
- Multi-Entity Support: Test multiple websites/platforms simultaneously
- Automated Screenshots: Capture full-page screenshots with custom viewport settings
- Visual Comparison: Detect changes between baseline and current screenshots
- Beautiful Dashboard: Modern React-based UI with real-time results
- Flexible Configuration: Customize viewport sizes, wait times, and other settings per entity
- GitHub Integration: Automated deployment to GitHub Pages
- Detailed Reporting: Comprehensive test results with error handling
The system consists of three main components:
- Backend Script (
scripts/visual-regression.js
): Node.js script using Playwright to capture screenshots - Frontend Dashboard (
frontend/
): React application to display results - Configuration (
config.json
): JSON configuration for entities and their settings
- Configuration: Define entities and their URLs in
config.json
- Screenshot Capture: Run the visual regression script to capture screenshots
- Comparison: Compare current screenshots against baseline images
- Results Storage: Save results in JSON format with metadata
- Dashboard Display: View results in the web dashboard
- Node.js 18+
- Yarn package manager
-
Clone the repository:
git clone https://github.com/codeinwp/crow-nest.git cd crow-nest
-
Install dependencies:
yarn install yarn run install-frontend
-
Configure entities: Edit
config.json
to add your websites (see Configuration section below) -
Run tests:
yarn test
-
Start the dashboard:
yarn dev
To add a new website/platform for testing, edit the config.json
file:
{
"my-website": {
"title": "My Website",
"links": [
"https://example.com",
"https://example.com/about",
"https://example.com/contact"
],
"description": "My company website",
"viewport": {
"width": 1920,
"height": 1080
},
"waitTime": 3000
}
}
Option | Type | Default | Description |
---|---|---|---|
title |
string | - | Human-readable name for the entity |
links |
array | - | Array of URLs to test |
description |
string | - | Description of the entity |
viewport |
object | {width: 1920, height: 1080} |
Browser viewport dimensions |
waitTime |
number | 2000 |
Wait time in milliseconds after page load |
{
"themeisle": {
"title": "Themeisle",
"links": [
"https://themeisle.com"
],
"description": "WordPress themes and plugins marketplace",
"viewport": {
"width": 1920,
"height": 1080
},
"waitTime": 2000
},
"optimole": {
"title": "Optimole",
"links": [
"https://optimole.com"
],
"description": "Image optimization and CDN service",
"viewport": {
"width": 1440,
"height": 900
},
"waitTime": 3000
}
}
Run visual regression tests for all configured entities:
yarn test
The system can be integrated with CI/CD pipelines. The GitHub Actions workflow automatically:
- Runs tests on push to master
- Builds the frontend dashboard
- Deploys to GitHub Pages
Test results are stored in the entities/
directory:
entities/
βββ themeisle/
β βββ baseline/
β β βββ screenshot-1.png
β βββ 2025.01.14/
β β βββ results.json
β β βββ screenshot-1.png
β βββ latest.json
βββ optimole/
βββ baseline/
βββ latest.json
- Entity Overview: View all configured entities with their status
- Detailed Results: Click on any entity to see individual test results
- Screenshot Comparison: View baseline and current screenshots side-by-side
- Status Indicators: Visual indicators for passing/failing tests
- Error Handling: Display and manage test errors
- Development:
yarn dev
(runs on http://localhost:3000) - Production: Automatically deployed to GitHub Pages
Different websites may require different viewport sizes for optimal testing:
{
"mobile-site": {
"title": "Mobile Website",
"links": ["https://mobile.example.com"],
"viewport": {
"width": 375,
"height": 667
}
}
}
Some websites may need longer load times:
{
"slow-site": {
"title": "Slow Loading Site",
"links": ["https://slow.example.com"],
"waitTime": 5000
}
}
The modular architecture makes it easy to extend:
- New Comparison Methods: Modify
compareImages()
in the script - Additional Configuration: Add new fields to entity configs
- Custom UI Components: Extend the React dashboard
- API Integration: Add endpoints for remote test triggering
-
Screenshots not captured:
- Check if URLs are accessible
- Verify viewport settings
- Increase wait time for slow-loading sites
-
Dashboard not loading:
- Ensure
config.json
exists and is valid JSON - Check that entities directory exists
- Verify frontend dependencies are installed
- Ensure
-
GitHub Pages deployment issues:
- Check GitHub Actions workflow
- Verify repository permissions
- Ensure build process completes successfully
Enable debug logging by modifying the script:
// In scripts/visual-regression.js
const DEBUG = true;
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details.
For issues and questions:
- Create an issue on GitHub
- Check the troubleshooting section
- Review the configuration examples
Built with β€οΈ by the Themeisle team