AI-Powered Test Flakiness Detection & Root Cause Analysis - Enterprise-grade analytics for test reliability
Project description
🔍 FlakeRadar
AI-Powered Test Flakiness Detection & Team Collaboration
Transform raw test results into actionable insights with statistical confidence scoring, AI-powered root cause analysis, and team collaboration features.
🚀 Quick Start
# Install and analyze
pip install flakeradar
flakeradar --project "MyApp" --results "test-results/*.xml"
open flakeradar_report.html
Python API:
from flakeradar import FlakeRadar
with FlakeRadar(project="MyApp") as radar:
radar.add_results("test-results/*.xml")
analysis = radar.analyze(confidence_threshold=0.7, enable_ai=True)
radar.generate_html_report("report.html")
🎯 Key Features
🔍 Smart Analysis
- Statistical Confidence Scoring - Wilson intervals eliminate false positives
- AI Root Cause Clustering - Groups failures by actual causes
- Time-to-Fix Tracking - Identifies chronic flaky tests
👥 Team Collaboration
- Central Dashboard - Shared analytics across environments
- Multi-Environment Tracking - Dev → Staging → Production insights
- CI/CD Integration - Jenkins, GitHub Actions, REST API
📊 Enterprise Ready
- Production-Tested Accuracy - Fixed confidence calculations
- Secure Token Authentication - Team collaboration with proper security
- Scalable Architecture - Supports teams of any size
🔧 Team Setup
1. Start Team Dashboard
python -m flakeradar.dev_server
# Dashboard: http://localhost:8000/dashboard/your-team-id
2. Create Team Token
curl -X POST http://localhost:8000/api/v1/team/tokens \
-d '{"team_name": "YourTeam", "environment": "production"}'
3. Jenkins Integration
environment {
FLAKERADAR_TEAM_TOKEN = credentials('flakeradar-team-token')
}
post {
always {
sh '''
pip install flakeradar
flakeradar --project "${JOB_NAME}" \
--results "test-results/*.xml" \
--team-token "${FLAKERADAR_TEAM_TOKEN}" \
--environment "${ENV}"
'''
}
}
4. GitHub Actions
- name: FlakeRadar Analysis
env:
FLAKERADAR_TEAM_TOKEN: ${{ secrets.FLAKERADAR_TEAM_TOKEN }}
run: |
pip install flakeradar
flakeradar --project "${{ github.repository }}" \
--results "test-results/*.xml" \
--team-token "$FLAKERADAR_TEAM_TOKEN" \
--environment "ci"
📖 CLI Reference
flakeradar [OPTIONS]
# Core Parameters
--project TEXT Project name (required)
--results TEXT Test files pattern (required, e.g., "*.xml")
# Team Collaboration
--team-token TEXT Team token (flake_tk_...)
--dashboard-url TEXT Dashboard URL
--environment TEXT Environment (dev/staging/prod)
# Analysis Options
--confidence-threshold FLOAT Statistical threshold (0.0-1.0, default: 0.7)
--enable-ai / --no-ai AI analysis (auto-detects API key)
--output TEXT Report filename (default: flakeradar_report.html)
🔧 Troubleshooting
Common Issues
❌ "Invalid token" error
# Verify token format
echo $FLAKERADAR_TEAM_TOKEN # Should start with "flake_tk_"
# Test token
curl -X POST "$DASHBOARD_URL/api/v1/team/validate" \
-H "Authorization: Bearer $FLAKERADAR_TEAM_TOKEN"
❌ Dashboard shows no data
# Check Jenkins console output for submission errors
# Verify environment variables are set correctly
❌ Analysis too slow
# Optimize for large test suites
flakeradar --limit-runs 20 --max-ai-analysis 5 --confidence-threshold 0.8
📊 Sample Output
🚨 Flaky Test Analysis Results:
📊 Total Tests: 245 | Flaky: 12 | High Confidence: 8
🔴 High Priority Flaky Tests:
DatabaseTest#connectionPool (82% confidence, 14 days flaky)
AuthTest#tokenRefresh (76% confidence, 7 days flaky)
🔍 Root Cause Analysis:
🗄️ Database connectivity: 8 tests affected
⏱️ Timing issues: 4 tests affected
🤖 AI Insights: 12 tests analyzed
✅ Report generated: flakeradar_report.html
🏢 Enterprise Features
- Mathematical Rigor - Wilson Score confidence intervals
- Production Accuracy - Fixed edge cases for 0%/100% failure rates
- Team Analytics - Cross-environment insights and contributor tracking
- Security - Token-based authentication with rotation support
- Integration - Jenkins, GitHub Actions, REST API, Python API
- Scalability - Supports individual developers to enterprise teams
📚 Links
- GitHub Repository - Source code and issues
- Documentation - Detailed guides
- Support - Questions and bug reports
Ready to eliminate flaky tests?
🚀 Get Started | 📖 Documentation | 💬 Support
Built by engineers who understand the pain of flaky tests
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flakeradar-2.1.0.tar.gz.
File metadata
- Download URL: flakeradar-2.1.0.tar.gz
- Upload date:
- Size: 46.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d210e086c29989bdcfd1bc0fd9d31ca9667821f277a8b6f28f064d78981de528
|
|
| MD5 |
b54c0725fbd11ea78a52d0073e7beea7
|
|
| BLAKE2b-256 |
82d8057c8c79d61a14420f9aa292fdb62b76b74f5aac828e252955cf2346babd
|
File details
Details for the file flakeradar-2.1.0-py3-none-any.whl.
File metadata
- Download URL: flakeradar-2.1.0-py3-none-any.whl
- Upload date:
- Size: 52.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50d1a8675dc4bd9070c12145bf18f68757bbc4f8393d5fd1ead553ce797fe14b
|
|
| MD5 |
7a7dc0d9e7aa511b6e3fe78a7c75a186
|
|
| BLAKE2b-256 |
d96734cb5b2426af0f6587a134b51bd54184d89f8ecbb9a8a45f078cadafc9cc
|