Skip to content

Usage Guide

This section provides detailed information on various ways to use YuanTest Playwright.

Table of Contents

In-depth Guides

For deeper content on specific areas, refer to these guides:

  • Flaky Test Management - Classification algorithm, root cause analysis, correlation analysis, trend tracking, quarantine strategy, health score, causal graph, parameter customization
  • AI Diagnosis - Context enrichment, knowledge base, Agent reasoning, confidence calibration, streaming diagnosis, LLM configuration

Development Phase

  1. Use Web UI for quick debugging
  2. Start Dashboard: yuantest ui
  3. Select tests to execute in the interface
  4. View test progress and results in real-time
  5. Quickly identify failure causes

  6. Use --grep to run specific tests

    yuantest run --grep "login feature" --output ./test-reports
    

  7. View detailed reports

  8. View test details in Dashboard
  9. View Trace files to analyze failure causes
  10. View screenshots and videos

  11. AI diagnose failed tests

  12. Click "AI Diagnosis" in Dashboard
  13. Or use CLI: yuantest analyze --id <run-id> --ai

CI/CD Phase

  1. Run full test suite via CLI

    yuantest run --test-dir ./ --output ./test-reports --shards 4
    

  2. Check Flaky test health

    yuantest health --json
    yuantest prediction --high-risk --json
    

  3. Upload reports as artifacts

  4. GitHub Actions: actions/upload-artifact
  5. GitLab CI: artifacts

  6. Optional: Deploy Dashboard server

  7. Run yuantest ui on server
  8. Team members can view historical reports anytime

Flaky Test Governance

  1. Identify Flaky tests

    yuantest flaky --list --json
    yuantest correlations
    

  2. Analyze root causes

    yuantest analyze --id <run-id> --ai
    

  3. Quarantine and monitor

  4. Quarantine Flaky tests in Dashboard
  5. Set monitoring thresholds and quarantine parameters
  6. Periodically check health scores

  7. Verify fixes

    yuantest rerun <run-id> <test-id>
    yuantest test-history <test-id>