webapp-testing
Set up browser testing — dual path with built-in browser tools (interactive) or Playwright (CI); detect framework, scaffold, verify
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Set up browser testing — dual path with built-in browser tools (interactive) or Playwright (CI); detect framework, scaffold, verify
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Create an Architectural Decision Record (ADR) to document a significant design or technology choice
Audit VS Code extensions against the current project stack and recommend keep/add/remove actions
Diagnose and fix a failing CI pipeline or GitHub Actions workflow
Triage a GitHub issue by classifying severity, labelling waste category, proposing next action, and drafting a structured response
Create a new MCP server — clarify purpose, choose transport, scaffold, implement, test, and register
Configure and manage Model Context Protocol servers for external tool access
| name | webapp-testing |
| description | Set up browser testing — dual path with built-in browser tools (interactive) or Playwright (CI); detect framework, scaffold, verify |
| compatibility | >=2.0 |
Skill metadata: version "2.0"; license MIT; tags [testing, e2e, playwright, browser, ci, browser-tools]; compatibility ">=2.0"; recommended tools [codebase, editFiles, runCommands].
Set up browser testing for a web application. This skill offers two paths:
| Factor | Path A (Browser tools) | Path B (Playwright) |
|---|---|---|
| Setup effort | Zero — built-in, no install | Moderate — install + configure |
| CI integration | No — interactive only | Yes — runs headless in CI |
| Test persistence | No — conversational | Yes — test files committed to repo |
| Browser coverage | Chromium only | Chromium + Firefox + WebKit |
| Best for | Quick verification, dev-time checks, debugging | Regression testing, PR gates, cross-browser |
| Requires | workbench.browser.enableChatTools: true (Preview) | Node.js + Playwright package |
Recommendation: Use Path A for interactive verification during development, Path B for CI. They complement each other — Path A validates quickly, Path B prevents regressions.
test-coverage-review skill identifies missing e2e coverageVS Code 1.110+ provides 10 agentic browser tools that allow Copilot to interact with web pages directly. These tools are experimental and require opt-in.
The user must enable the setting:
{
"workbench.browser.enableChatTools": true
}
Note: This is a Preview feature. It may change or be removed in future VS Code releases.
| Tool | Purpose |
|---|---|
openBrowserPage | Open a URL in a managed browser |
navigatePage | Navigate to a new URL |
readPage | Read page content (text, links, forms, structure) |
screenshotPage | Capture a screenshot for visual verification |
clickElement | Click a button, link, or interactive element |
hoverElement | Hover over an element |
dragElement | Drag and drop an element |
typeInPage | Type text into input fields |
handleDialog | Accept or dismiss browser dialogs |
runPlaywrightCode | Run custom Playwright code snippets in the browser context |
openBrowserPage to open the app URLreadPage to verify page content loads correctlyscreenshotPage for visual verificationclickElement / typeInPage to interact with forms, navigationreadPage after interactions to verify state changesUser: "Check if my login page works"
Agent:
1. openBrowserPage("http://localhost:3000/login")
2. readPage() → verify login form elements exist
3. typeInPage(selector: "#email", text: "test@example.com")
4. typeInPage(selector: "#password", text: "testpass")
5. clickElement(selector: "button[type=submit]")
6. readPage() → verify redirect or error message
7. screenshotPage() → capture visual state
Scan the project for framework signals:
| Signal | Framework | Dev server command |
|---|---|---|
next.config.*, "next" in deps | Next.js | npx next dev |
vite.config.*, "vite" in deps | Vite (React/Vue/Svelte) | npx vite |
nuxt.config.*, "nuxt" in deps | Nuxt | npx nuxt dev |
angular.json, "@angular/core" in deps | Angular | npx ng serve |
svelte.config.*, "@sveltejs/kit" in deps | SvelteKit | npx vite dev |
remix.config.*, "@remix-run/dev" in deps | Remix | npx remix dev |
astro.config.*, "astro" in deps | Astro | npx astro dev |
Also check package.json scripts for "dev", "start", or "serve" commands.
If no framework is detected, ask the user how to start the development server.
npm init playwright@latest -- --quiet
Update playwright.config.ts for the detected framework:
import { defineConfig, devices } from "@playwright/test";
export default defineConfig({
testDir: "./tests/e2e",
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: process.env.CI ? "github" : "html",
use: {
baseURL: "http://localhost:<PORT>",
trace: "on-first-retry",
screenshot: "only-on-failure",
},
projects: [
{ name: "chromium", use: { ...devices["Desktop Chrome"] } },
{ name: "firefox", use: { ...devices["Desktop Firefox"] } },
{ name: "webkit", use: { ...devices["Desktop Safari"] } },
],
webServer: {
command: "<DEV_SERVER_COMMAND>",
url: "http://localhost:<PORT>",
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
});
Replace <PORT> and <DEV_SERVER_COMMAND> with the detected values.
Create tests/e2e/smoke.spec.ts — a smoke test that verifies the app loads:
import { test, expect } from "@playwright/test";
test("home page loads successfully", async ({ page }) => {
await page.goto("/");
await expect(page).toHaveTitle(/.+/);
await expect(page.locator("body")).not.toContainText("500");
await expect(page.locator("body")).not.toContainText("Internal Server Error");
});
test("navigation is functional", async ({ page }) => {
await page.goto("/");
const links = page.locator("a[href]");
await expect(links.first()).toBeVisible();
});
npx playwright test
Create .github/workflows/playwright.yml:
name: Playwright Tests
on:
push:
branches: [main]
pull_request:
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
Add to .gitignore:
# Playwright
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
Add convenience scripts to package.json:
{
"scripts": {
"test:e2e": "playwright test",
"test:e2e:ui": "playwright test --ui",
"test:e2e:report": "playwright show-report"
}
}
workbench.browser.enableChatTools is enabled when using built-in toolsnpx playwright test passes on at least Chromium.gitignore excludes Playwright artifactspackage.json has test:e2e script