Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.
amandaxmqiu edited this page Jul 25, 2025 · 3 revisions

GUI-Based Testing Code Review Wiki

πŸ” Enhance pull request reviews with visual testing feedback, automated quality checks, and interactive dashboards

GitHub Action License: MIT Playwright

Dashboard preview

✨ What This Does

Automatically captures and displays visual context from your Playwright tests directly in GitHub pull requests - no more asking reviewers to run tests locally to understand what changed.

🎯 Key Features

  • πŸ”„ Visual Comparison - Side-by-side test results from PR vs main branch
  • πŸ“Š Interactive Dashboard - Beautiful test reports with flowcharts and metrics
  • πŸ“‹ Review Checklists - Automated tracking of review completeness
  • 🎨 Code Quality - ESLint/Prettier checks with inline PR feedback via reviewdog
  • πŸš€ Modular Design - Use all-in-one or integrate with existing CI/CD

πŸš€ Quick Start

Add to your workflow in 30 seconds:

name: GUI Test Review
on: [pull_request]

jobs:
  test-review:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
      pages: write
      id-token: write
    
    steps:
      - uses: actions/checkout@v4
      - uses: DigitalProductInnovationAndDevelopment/Code-Reviews-of-GUI-Tests@v1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          enable-visual-comparison: 'true'  # Compare PR vs main

That's it! The action will:

  1. Run your Playwright tests
  2. Check code quality with ESLint/Prettier
  3. Generate an interactive dashboard
  4. Post a summary comment on your PR

πŸ—οΈ Required Project Structure

your-gui-project/
β”œβ”€β”€ tests/                          # GUI test files
β”‚   β”œβ”€β”€ *.spec.{js,ts,tsx}         # Playwright test files
β”‚   └── fixtures/                   # Test data and fixtures
β”œβ”€β”€ scripts/                        # Action scripts (auto-included)
β”œβ”€β”€ package.json                    # Dependencies
β”œβ”€β”€ playwright.config.js            # Playwright configuration
β”œβ”€β”€ .eslintrc.json                  # ESLint configuration (optional)
β”œβ”€β”€ .prettierrc.json               # Prettier configuration (optional)
└── README.md                       # Project documentation

πŸ“¦ Required Dependencies

Add these to your package.json:

{
  "devDependencies": {
    "@playwright/test": "^1.52.0",
    "@mermaid-js/mermaid-cli": "10.6.1",
    "@octokit/core": "^5.0.0",
    "@typescript-eslint/eslint-plugin": "^8.35.0",
    "@typescript-eslint/parser": "^8.35.0",
    "eslint": "^8.0.0",
    "eslint-plugin-playwright": "^2.2.0",
    "eslint-plugin-prettier": "^5.5.1",
    "marked": "15.0.12",
    "prettier": "^3.3.2"
  }
}

πŸ”§ Common Configurations

Use with Existing Tests

Already running tests? Just add the dashboard:

jobs:
  your-tests:
    # ... your existing test job
    
  dashboard:
    needs: [your-tests]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/download-artifact@v4
      - uses: DigitalProductInnovationAndDevelopment/Code-Reviews-of-GUI-Tests@v1
        with:
          mode: 'dashboard-only'

Separate Lint and Test Jobs

with:
  mode: 'test-only'  # or 'lint-only'

Key Inputs

Input Description Default
mode full, test-only, lint-only, dashboard-only full
enable-visual-comparison Compare PR vs main branch false
enable-github-pages Deploy dashboard to Pages true
test-files Test file pattern tests

πŸ“š Full Configuration Guide β†’

πŸ“Š What You Get

  • PR Comment with test summary and metrics
  • Interactive Dashboard with test flows and results
  • Inline Code Review feedback via reviewdog
  • Visual Comparisons between branches
  • Review Checklist tracking

πŸ“š Documentation

🀝 Contributing

This project was developed for the Digital Product Innovation and Development Seminar at TUM.

πŸ“š Full Academic Context & References β†’

πŸ“„ License

This project is licensed under the MIT License.

πŸ™ Acknowledgments


πŸ“– Wiki β€’ πŸ› Issues β€’ πŸ’¬ Discussions