Skip to main content

AI-Powered Test Flakiness Detection & Team Collaboration - Enterprise-grade analytics with cross-environment insights

Project description

🔍 FlakeRadar

AI-Powered Test Flakiness Detection & Team Collaboration

Python 3.9+ MIT License Enterprise Ready

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


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

flakeradar-2.0.0.tar.gz (46.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flakeradar-2.0.0-py3-none-any.whl (51.7 kB view details)

Uploaded Python 3

File details

Details for the file flakeradar-2.0.0.tar.gz.

File metadata

  • Download URL: flakeradar-2.0.0.tar.gz
  • Upload date:
  • Size: 46.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for flakeradar-2.0.0.tar.gz
Algorithm Hash digest
SHA256 b144924afecdc8f2c9f355acbebd08c3316d99ae9431993d61db98c25327b215
MD5 b6fe840d79b617eef256864dd4743ab1
BLAKE2b-256 33b8d204e41bf10fb44777052287e180758a0e408df1717658ac623ba54dc6f5

See more details on using hashes here.

File details

Details for the file flakeradar-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: flakeradar-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 51.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for flakeradar-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf59f684815f1bec5a320f5af9ba667713ef3760770e570549afa8159617a099
MD5 666244e2ef786fb3a60fa429475b5c3f
BLAKE2b-256 6e8722ba437eeedc03c2a0e57cbee23d674c483ae3da8b16be6b2f09efcc2749

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page