AGENT SKILL

pw-ci-configurator

Generates CI configuration (GitHub Actions) for a Playwright suite. Use when an SDET says "set up Playwright in CI", "add a GitHub Actions workflow", "shard my tests across jobs", "upload traces and the HTML report", or "run browsers in a matrix". Produces a workflow with install, sharding, blob/HTML reporting, and artifacts — a draft the engineer commits and runs on their pipeline.

License 许可
MIT
最近更新
2026-07-15
Stars
★ 4
Forks
8

01 前言 Front Matter

name
pw-ci-configurator
license
MIT
metadata
{ "pack": "playwright", "author": "TheTestingAcademy", "version": "1.0.0" }
description
Generates CI configuration (GitHub Actions) for a Playwright suite. Use when an SDET says "set up Playwright in CI", "add a GitHub Actions workflow", "shard my tests across jobs", "upload traces and the HTML report", or "run browsers in a matrix". Produces a workflow with install, sharding, blob/HTML reporting, and artifacts — a draft the engineer commits and runs on their pipeline.

03 SKILL.md 正文

PW CI Configurator

You draft a CI workflow the engineer must commit and run on their runner — never a guaranteed-green pipeline. You wire in sharding, reporting, and artifacts.

When to use

  • A repo needs Playwright running on GitHub Actions.
  • A slow suite should be sharded across parallel jobs.
  • Someone wants trace/video/report artifacts on failure.

Workflow

  1. Confirm the runtime — Node version, package manager, and which projects/ browsers must run. Don't assume; ask if unstated.
  2. Install correctly — cache deps, then npx playwright install --with-deps for the browsers actually used (don't install all if only Chromium is needed).
  3. Shard for speed — a matrix of shardIndex/shardTotal, each job running --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} with the blob reporter, then a final merge-reports job to produce one HTML report.
  4. Persist evidence — trace: 'on-first-retry', and upload-artifact for the blob reports, merged HTML report, and any traces/videos, if: always().
  5. Set CI ergonomics — retries: 2 and workers via config's !!process.env.CI, and fail-fast: false so one shard's failure doesn't cancel the others.

Output shape

name: playwright
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        shard: [1, 2, 3, 4]
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 20, cache: npm }
      - run: npm ci
      - run: npx playwright install --with-deps chromium
      - run: npx playwright test --shard=${{ matrix.shard }}/4 --reporter=blob
      - uses: actions/upload-artifact@v4
        if: always()
        with: { name: blob-${{ matrix.shard }}, path: blob-report, retention-days: 7 }

Guardrails

  • This is a draft the engineer must commit and run — never assume the Node version, package manager, browser set, or secret names; confirm them.
  • Never hardcode credentials; reference secrets.*, don't invent values.
  • Shards emit blob reports merged in a follow-up job — don't upload conflicting HTML reports per shard.
  • Upload artifacts with if: always() or you lose evidence on the runs that matter.

04 同仓库更多 Skills

PramodDutta
PramodDutta/skillmasterclass

se-wait-fixer

Scans Selenium Java code for Thread.sleep and for implicit+explicit wait mixing, then replaces them with WebDriverWait/ExpectedConditions or FluentWait to fix synchronization. Use when an SDET says "remove Thread.sleep from my tests", "fix the flaky waits", "my implicit and explicit waits conflict", or pastes code full of hard sleeps. Produces refactors the engineer must run and confirm.

★ 4
PramodDutta
PramodDutta/skillmasterclass

se-test-generator

Generates a runnable Selenium 4 + TestNG test in Java from a plain-language scenario, using explicit waits and stable locators. Use when an SDET says "write a Selenium test for login", "generate a TestNG test for the checkout flow", "automate this scenario in Selenium", or pastes Gherkin/steps and wants Java WebDriver code. Produces a draft test the engineer must review and run.

★ 4
PramodDutta
PramodDutta/skillmasterclass

se-report-integrator

Integrates reporting (Allure or ExtentReports) into a Selenium + TestNG suite with listeners, screenshot-on-failure, and step logging. Use when an SDET says "add Allure to my tests", "set up ExtentReports", "capture a screenshot on failure", "add a TestNG listener for reporting", or wants readable run reports. Produces listener and config code the engineer must run to generate a report.

★ 4
PramodDutta
PramodDutta/skillmasterclass

se-page-object-builder

Builds a Page Object Model class in Java (PageFactory @FindBy or explicit locators) with action methods and a WebDriverWait for a given page. Use when an SDET says "create a page object for the login page", "build a POM class", "refactor these locators into a page object", or pastes a page's fields and wants a reusable POM. Produces a draft class the engineer must review and run.

★ 4
PramodDutta
PramodDutta/skillmasterclass

se-locator-strategist

Recommends and repairs Selenium locator strategy — replaces brittle absolute XPath with By.id, By.cssSelector, or Selenium 4 relative locators, and explains the trade-offs. Use when an SDET says "this XPath keeps breaking", "make this locator more stable", "why is my locator flaky", "convert this XPath to CSS", or pastes selectors to harden. Produces proposals the engineer must verify in the DOM.

★ 4
PramodDutta
PramodDutta/skillmasterclass

se-grid-configurator

Configures Selenium Grid 4 (hub-and-node or standalone, including Docker) and wires RemoteWebDriver for parallel and distributed runs. Use when an SDET says "set up Selenium Grid", "run my tests on a remote grid", "dockerize Selenium Grid 4", "point my tests at RemoteWebDriver", or wants parallel execution across nodes. Produces config and code the engineer must run and validate in their environment.

★ 4