Get the FREE Ultimate OpenClaw Setup Guide →

Test Automation

Scanned
npx machina-cli add skill a5c-ai/babysitter/test-automation --openclaw
Files (1)
SKILL.md
982 B

Test Automation

Execute Vitest and Playwright test suites with result collection and failure analysis.

Agent

Test Runner - automaker-test-runner

Workflow

  1. Navigate to worktree path
  2. Run Vitest unit tests (npx vitest run --reporter=json)
  3. Run Playwright E2E tests (npx playwright test --reporter=json)
  4. Collect pass/fail counts per suite
  5. Extract failure messages and stack traces
  6. Measure code coverage
  7. Identify flaky tests
  8. Analyze failure root causes for convergence

Inputs

  • projectName - Project name
  • featureId - Feature identifier
  • worktreePath - Path to isolated worktree
  • testFramework - Framework: 'vitest', 'playwright', 'both'
  • changedFiles - Files changed by implementation

Outputs

  • Test results with allPassed, counts, failures, coverage, flaky tests

Process Files

  • automaker-orchestrator.js - Phase 3 (testing)
  • automaker-agent-execution.js - Stages 4-5
  • automaker-review-ship.js - Integration testing

Source

git clone https://github.com/a5c-ai/babysitter/blob/main/plugins/babysitter/skills/babysit/process/methodologies/automaker/skills/test-automation/SKILL.mdView on GitHub

Overview

Test Automation runs Vitest unit tests and Playwright end-to-end tests, collecting results for analysis. It surfaces failures, measures coverage, and flags flaky tests to improve reliability.

How This Skill Works

It navigates to the worktree path, runs Vitest unit tests with npx vitest run --reporter=json, and runs Playwright tests with npx playwright test --reporter=json. It then collects pass/fail counts per suite, extracts failures and stack traces, measures code coverage, and surfaces flaky tests for root-cause analysis.

When to Use It

  • You need both unit and end-to-end coverage for a new or updated feature.
  • You want quantified test results with per-suite pass/fail counts and coverage.
  • You suspect flaky tests and require root-cause analysis.
  • CI pipelines require structured test results and coverage data.
  • You are analyzing failures to converge on reliable fixes.

Quick Start

  1. Step 1: Navigate to the worktree path and prepare inputs (projectName, featureId, worktreePath).
  2. Step 2: Run Vitest unit tests (npx vitest run --reporter=json) and Playwright tests (npx playwright test --reporter=json).
  3. Step 3: Inspect outputs: allPassed, per-suite counts, failures, coverage, and flaky tests.

Best Practices

  • Navigate to the correct worktree path before running tests to ensure proper context.
  • Use --reporter=json for Vitest and Playwright to enable structured parsing.
  • Run Vitest and Playwright when changes affect both unit and end-to-end behavior.
  • Provide accurate inputs (projectName, featureId, worktreePath, testFramework, changedFiles) for targeted runs.
  • Review failures with messages and stack traces alongside coverage data to pinpoint root causes.

Example Use Cases

  • A feature PR is verified with both unit tests and Playwright E2E tests, producing per-suite results and coverage.
  • Flaky tests are diagnosed, with results showing flaky tests and failing stacks for stabilization.
  • A release dashboard is populated with per-suite pass/fail counts and overall coverage.
  • After a bug is fixed, tests are re-run to confirm convergence and reduced flaky behavior.
  • Code refactors are validated by updated test results and coverage reports.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers