App Testing
Test application functionality and mobile responsiveness on localhost or remote live sites using Playwright MCP browser automation. Navigates pages, interacts with elements, validates content, tests mobile-friendliness across device viewports, and reports results.
Command
/test-app or test-app
Navigate
Testing & QA
Keywords
test app, test site, test my app, test my site, test localhost, test live site, functional test, ui test, smoke test, e2e test, end to end test, test buttons, test forms, test navigation, test links, playwright test, browser test, test functionality, qa test, test page, test deployed site, test production, verify app, check app works, test-app, test mobile, mobile friendly, responsive test, mobile view, mobile responsiveness, test on phone, mobile testing, responsive design test, viewport test
Description
Uses Playwright MCP to launch a browser, navigate to your app (localhost or remote URL), and systematically test functionality and mobile responsiveness. Takes snapshots to understand page structure, interacts with elements (clicks, types, selects), validates expected behavior, resizes the browser to mobile/tablet viewports to verify responsive design, and generates a test report with pass/fail results and screenshots of failures.
Execution
This skill runs using Claude Code with subscription plan. Requires the Playwright MCP server to be configured and available. All browser interactions use Playwright MCP tools (browser_navigate, browser_snapshot, browser_click, browser_type, etc.).
Response
I'll test your app's functionality using Playwright MCP!
The workflow includes:
| Step |
Description |
| Discover |
Determine target URL (localhost or remote) |
| Snapshot |
Take accessibility snapshot to understand page structure |
| Plan |
Identify testable elements and user flows |
| Execute |
Run through test scenarios interacting with the app |
| Validate |
Check expected outcomes after each interaction |
| Mobile |
Test responsiveness across mobile and tablet viewports |
| Report |
Generate test summary with pass/fail results |
Instructions
When executing /test-app, follow this workflow:
Phase 0: Determine Target URL
The user may provide a URL directly or you need to detect it:
If user provides a URL (e.g., test-app https://mysite.com or test-app localhost:3000):
- Use the provided URL directly
- If just a domain without protocol, prepend
https://
- If
localhost without port, try common ports: 3000, 5173, 8080, 8000, 4321
If no URL provided, auto-detect:
Validate the target is reachable:
curl -s -o /dev/null -w "%{http_code}" <URL> 2>/dev/null
- If the response is not 2xx or 3xx, inform the user the target is unreachable
- For localhost, ensure the server is running first (suggest
/start-app if not)
Phase 1: Initial Page Load & Snapshot
Navigate to the target URL and capture the initial state:
Navigate to the app:
Use browser_navigate to open the target URL.
Take accessibility snapshot:
Use browser_snapshot to get the full page structure. This returns a structured representation of all interactive elements, text content, links, buttons, forms, and navigation.
Take a screenshot for visual reference:
Use browser_take_screenshot to capture the initial visual state.
Analyze the page structure:
From the snapshot, identify:
- Navigation menus and links
- Buttons and interactive elements
- Forms and input fields
- Main content areas
- Dynamic elements (dropdowns, modals, tabs)
- Error messages or broken elements
Phase 2: Plan Test Scenarios
Based on the page snapshot, plan test scenarios organized by priority:
2.1 Critical Path Tests (always run)
- Page loads successfully — no error states, main content renders
- Navigation works — all nav links are clickable and lead to valid pages
- No console errors — check
browser_console_messages for errors
- No broken network requests — check
browser_network_requests for failed calls
2.2 Interactive Element Tests
- Buttons — click each visible button and verify expected behavior
- Links — verify internal links navigate correctly, external links exist
- Forms — fill in form fields and submit, verify validation messages
- Dropdowns/Selects — open and select options
- Tabs/Accordions — toggle and verify content changes
- Modals/Dialogs — trigger and verify they open/close properly
2.3 Content Validation Tests
- Text content — verify headings, paragraphs, and labels are present
- Images — verify images load (no broken image indicators)
- Lists/Tables — verify data renders correctly
- Dynamic content — verify content loads after API calls
2.4 User Flow Tests (if applicable)
Identify common user flows based on the app type:
- Auth apps — login/signup/logout flow
- E-commerce — browse/add to cart/checkout flow
- Forms — fill/validate/submit flow
- Dashboards — navigate between views, filter/sort data
- Landing pages — CTA buttons, anchor links, contact forms
Phase 3: Execute Tests
Run each test scenario using Playwright MCP tools. For each test:
- Snapshot before action — use
browser_snapshot to understand current state
- Perform the action — use the appropriate Playwright MCP tool:
browser_click — for buttons, links, tabs
browser_type — for text inputs
browser_fill_form — for multiple form fields
browser_select_option — for dropdowns
browser_press_key — for keyboard interactions (Enter, Escape, Tab)
browser_hover — for hover states and tooltips
browser_navigate — for direct URL navigation
browser_navigate_back — to return to previous page
- Snapshot after action — use
browser_snapshot to verify the result
- Validate — check that the expected outcome occurred:
- Element appeared/disappeared
- Text changed
- Page navigated
- Form submitted successfully
- Error message displayed for invalid input
- Screenshot on failure — if a test fails, use
browser_take_screenshot to capture the failure state
Test Execution Rules
- Wait for dynamic content — use
browser_wait_for when expecting async changes
- Handle dialogs — use
browser_handle_dialog if alerts/confirms appear
- Check console — periodically use
browser_console_messages to catch JS errors
- Check network — use
browser_network_requests to catch failed API calls
- Navigate back — after testing a sub-page, navigate back to continue testing
- Use tabs — use
browser_tabs to manage multiple pages if needed
Phase 4: Multi-Page Testing
If the app has multiple pages/routes:
- Collect all navigation links from the snapshot
- Visit each page and run Phase 1 (snapshot + basic validation) on each
- Test cross-page flows (e.g., add to cart on page A, verify cart on page B)
- Test browser back/forward navigation
For single-page apps (SPAs):
- Test client-side routing by clicking nav elements
- Verify URL changes in the browser
- Test deep linking by navigating directly to routes
Phase 5: Mobile Responsiveness Testing
After desktop testing, resize the browser to test mobile-friendliness across common device viewports. This phase ensures the app works well on phones and tablets.
5.1 Define Test Viewports
Test at these standard device sizes (width x height):
| Device |
Width |
Height |
Category |
| iPhone SE |
375 |
667 |
Small phone |
| iPhone 14 / 15 |
390 |
844 |
Standard phone |
| iPhone 14 Pro Max |
430 |
932 |
Large phone |
| iPad Mini |
768 |
1024 |
Small tablet |
| iPad Air / Pro |
820 |
1180 |
Standard tablet |
At minimum, always test these 3 viewports:
- Small phone (375×667) — catches tight layout issues
- Standard phone (390×844) — most common mobile device
- Tablet (768×1024) — catches tablet breakpoint issues
5.2 Mobile Test Execution
For each viewport, perform the following:
Resize the browser:
Use browser_resize to set the viewport dimensions:
browser_resize(width: 375, height: 667) // iPhone SE
Navigate to the main page:
Use browser_navigate to reload the app at the target URL (ensures fresh responsive layout).
Take a screenshot:
Use browser_take_screenshot to capture the mobile layout for visual reference.
Take an accessibility snapshot:
Use browser_snapshot to get the page structure at this viewport size.
Check for mobile layout issues:
- Horizontal overflow — look for horizontal scrollbars or content extending beyond the viewport. Use
browser_evaluate to check:() => document.documentElement.scrollWidth > document.documentElement.clientWidth
- Viewport meta tag — verify the page has a proper viewport meta tag. Use
browser_evaluate:() => {
const meta = document.querySelector('meta[name="viewport"]');
return meta ? meta.getAttribute('content') : 'MISSING';
}
- Touch target sizes — verify buttons and links are at least 44x44px for tap accessibility. Use
browser_evaluate:() => {
const issues = [];
document.querySelectorAll('a, button, [role="button"], input, select, textarea').forEach(el => {
const rect = el.getBoundingClientRect();
if (rect.width > 0 && rect.height > 0 && (rect.width < 44 || rect.height < 44)) {
issues.push({ tag: el.tagName, text: el.textContent?.slice(0, 30), width: Math.round(rect.width), height: Math.round(rect.height) });
}
});
return issues.length > 0 ? issues : 'ALL PASS';
}
- Text readability — check that body font size is at least 16px (prevents auto-zoom on iOS). Use
browser_evaluate:() => {
const body = document.body;
const fontSize = parseFloat(window.getComputedStyle(body).fontSize);
const inputs = document.querySelectorAll('input, textarea, select');
const smallInputs = [];
inputs.forEach(el => {
const size = parseFloat(window.getComputedStyle(el).fontSize);
if (size < 16) smallInputs.push({ tag: el.tagName, type: el.type, fontSize: size });
});
return { bodyFontSize: fontSize, inputsBelow16px: smallInputs.length > 0 ? smallInputs : 'NONE' };
}
Test mobile navigation:
- Hamburger menu — look for a hamburger/menu icon button in the snapshot. If found:
- Click it with
browser_click
- Snapshot to verify the mobile nav menu opens
- Verify all navigation links are visible and clickable
- Click each nav link to verify it works
- Verify the menu can be closed (click hamburger again, click outside, or press Escape)
- Sticky/fixed headers — scroll down and verify header stays visible if sticky. Use
browser_evaluate:() => {
window.scrollTo(0, 500);
const header = document.querySelector('header, nav, [role="banner"]');
if (!header) return 'NO HEADER FOUND';
const rect = header.getBoundingClientRect();
return { isVisible: rect.top >= 0 && rect.bottom <= window.innerHeight, top: rect.top };
}
- Bottom navigation — if a mobile bottom nav exists, verify it stays fixed at bottom
Test mobile-specific interactions:
Test content stacking:
- Verify multi-column layouts properly stack to single-column on mobile
- Check that sidebars collapse or move below main content
- Verify cards/grid items reflow properly
5.3 Responsive Breakpoint Transitions
After testing individual viewports, test the transition between breakpoints:
- Start at desktop (1280×800) with
browser_resize
- Step down through breakpoints:
- 1024×768 (small desktop / landscape tablet)
- 768×1024 (tablet portrait)
- 390×844 (phone)
- At each step, take a snapshot and screenshot to verify:
- Layout transitions smoothly (no broken intermediate states)
- Navigation switches between desktop and mobile modes at an appropriate breakpoint
- Content remains accessible at every width
5.4 Restore Desktop Viewport
After mobile testing, restore the browser to desktop size:
browser_resize(width: 1280, height: 800)
Phase 6: Generate Test Report
After all tests complete, generate a structured report:
## Test Report
**Target:** <URL>
**Date:** <current date/time>
**Total Tests:** <count>
**Passed:** <count> | **Failed:** <count> | **Skipped:** <count>
### Results
| # | Test | Status | Details |
|---|------|--------|---------|
| 1 | Page loads successfully | PASS | Main content rendered in <X>ms |
| 2 | Navigation - Home link | PASS | Navigated to / |
| 3 | Navigation - About link | PASS | Navigated to /about |
| 4 | Login form submission | FAIL | Expected redirect, got validation error |
| 5 | Contact form - empty submit | PASS | Validation messages displayed |
| ... | ... | ... | ... |
### Failures
#### Test 4: Login form submission
- **Action:** Filled email/password and clicked Submit
- **Expected:** Redirect to dashboard
- **Actual:** Validation error "Invalid credentials"
- **Screenshot:** [captured]
### Console Errors
- [error] Failed to load resource: /api/users (404)
- [warning] React: Each child in a list should have a unique "key" prop
### Network Issues
- GET /api/users → 404 Not Found
- POST /api/login → 500 Internal Server Error
### Mobile Responsiveness
| Viewport | Status | Issues |
|----------|--------|--------|
| iPhone SE (375×667) | PASS/FAIL | Details |
| iPhone 14 (390×844) | PASS/FAIL | Details |
| iPad Mini (768×1024) | PASS/FAIL | Details |
#### Mobile Issues Found
- **Horizontal overflow** on iPhone SE — content extends 40px beyond viewport
- **Touch targets too small** — 3 buttons under 44px height on mobile nav
- **Missing viewport meta tag** — page does not have `<meta name="viewport">`
- **Input font size < 16px** — email input has 14px font (causes iOS auto-zoom)
- **Hamburger menu not functional** — menu icon present but click has no effect
### Recommendations
- Fix the /api/users endpoint returning 404
- Add proper error handling for login failures
- Add alt text to images on the homepage
- Add `<meta name="viewport" content="width=device-width, initial-scale=1">` if missing
- Increase touch target sizes to minimum 44×44px
- Set input font sizes to at least 16px to prevent iOS auto-zoom
- Add responsive breakpoints for mobile layouts
Phase 7: Cleanup
After testing:
- Close the browser with
browser_close
- Display the test report to the user
- If failures were found, offer to:
- Investigate specific failures in more detail
- Re-run failed tests after fixes
- Take additional screenshots
Advanced Usage
Testing with Arguments
Users can pass specific test targets:
/test-app — auto-detect URL, run all tests
/test-app http://localhost:3000 — test specific localhost
/test-app https://mysite.com — test remote site
/test-app https://mysite.com/login — test specific page
/test-app --forms — focus on form testing
/test-app --nav — focus on navigation testing
/test-app --a11y — focus on accessibility checks
/test-app --mobile — focus on mobile responsiveness testing only
/test-app --responsive — run full responsive test across all viewports
Testing Remote vs Local
Localhost testing:
- Can test with hot-reload (changes reflect immediately)
- Can test authenticated flows with test credentials
- Can test API endpoints directly
Remote/live site testing:
- Tests the deployed production build
- Validates CDN, SSL, and production configs
- Can catch deployment-specific issues
- Respects rate limits and avoids destructive actions (no form submissions with real data unless explicitly requested)
Capabilities
- Navigate to any localhost or remote URL via Playwright MCP
- Take accessibility snapshots to understand full page structure
- Click buttons, links, tabs, and any interactive elements
- Fill and submit forms with test data
- Validate page content, navigation, and UI behavior
- Capture screenshots for visual verification and failure documentation
- Check browser console for JavaScript errors
- Monitor network requests for failed API calls
- Test multi-page flows and SPA client-side routing
- Handle browser dialogs (alerts, confirms, prompts)
- Test mobile responsiveness by resizing to phone/tablet viewports (iPhone SE, iPhone 14, iPad Mini, etc.)
- Detect mobile layout issues — horizontal overflow, small touch targets, missing viewport meta, font size issues
- Test mobile navigation — hamburger menus, sticky headers, bottom nav bars
- Verify responsive breakpoint transitions — layout changes smoothly from desktop to mobile
- Generate structured test reports with pass/fail results including mobile responsiveness section
Notes
- This skill requires Playwright MCP to be configured in Claude Code
- For localhost testing, ensure the app is running first (use
/start-app if needed)
- The skill does NOT modify any application code — it only reads and interacts via the browser
- Remote site testing avoids destructive actions by default (no real purchases, account deletions, etc.)
- Form testing uses obviously fake test data (e.g., test@example.com, "Test User")
- Screenshots are captured for failures to help debug issues
- Console and network errors are always checked even if not explicitly requested
1---2name: app-testing3description: Test app functionality and mobile responsiveness on localhost or remote live sites using Playwright MCP. Navigates pages, clicks buttons, fills forms, checks content, validates UI behavior, and tests mobile-friendliness across device viewports. Use when running "test app", "test my site", "test the app", "test mobile", or any functional/responsive testing task.4---56# App Testing78Test application functionality and mobile responsiveness on localhost or remote live sites using Playwright MCP browser automation. Navigates pages, interacts with elements, validates content, tests mobile-friendliness across device viewports, and reports results.910## Command11`/test-app` or `test-app`1213## Navigate14Testing & QA1516## Keywords17test app, test site, test my app, test my site, test localhost, test live site, functional test, ui test, smoke test, e2e test, end to end test, test buttons, test forms, test navigation, test links, playwright test, browser test, test functionality, qa test, test page, test deployed site, test production, verify app, check app works, test-app, test mobile, mobile friendly, responsive test, mobile view, mobile responsiveness, test on phone, mobile testing, responsive design test, viewport test1819## Description20Uses Playwright MCP to launch a browser, navigate to your app (localhost or remote URL), and systematically test functionality and mobile responsiveness. Takes snapshots to understand page structure, interacts with elements (clicks, types, selects), validates expected behavior, resizes the browser to mobile/tablet viewports to verify responsive design, and generates a test report with pass/fail results and screenshots of failures.2122## Execution23This skill runs using **Claude Code with subscription plan**. Requires the Playwright MCP server to be configured and available. All browser interactions use Playwright MCP tools (browser_navigate, browser_snapshot, browser_click, browser_type, etc.).2425## Response26I'll test your app's functionality using Playwright MCP!2728The workflow includes:2930| Step | Description |31|------|-------------|32| **Discover** | Determine target URL (localhost or remote) |33| **Snapshot** | Take accessibility snapshot to understand page structure |34| **Plan** | Identify testable elements and user flows |35| **Execute** | Run through test scenarios interacting with the app |36| **Validate** | Check expected outcomes after each interaction |37| **Mobile** | Test responsiveness across mobile and tablet viewports |38| **Report** | Generate test summary with pass/fail results |3940## Instructions4142When executing `/test-app`, follow this workflow:4344### Phase 0: Determine Target URL4546The user may provide a URL directly or you need to detect it:47481. **If user provides a URL** (e.g., `test-app https://mysite.com` or `test-app localhost:3000`):49 - Use the provided URL directly50 - If just a domain without protocol, prepend `https://`51 - If `localhost` without port, try common ports: 3000, 5173, 8080, 8000, 432152532. **If no URL provided**, auto-detect:54 - Check for running localhost servers by scanning common ports:55 ```bash56 for port in 3000 5173 8080 8000 4321 8501 5000 9292; do57 lsof -ti:$port >/dev/null 2>&1 && echo "Found server on port $port"58 done59 ```60 - If exactly one server is found, use it61 - If multiple servers found, ask the user which one to test62 - If no server found, check for a deployed URL:63 - Look for `vercel.json`, `.vercel/project.json` for Vercel deployments64 - Look for `CNAME` file or `.github/workflows` for GitHub Pages65 - Check `package.json` for `homepage` field66 - If nothing found, ask the user for the URL67683. **Validate the target is reachable:**69 ```bash70 curl -s -o /dev/null -w "%{http_code}" <URL> 2>/dev/null71 ```72 - If the response is not 2xx or 3xx, inform the user the target is unreachable73 - For localhost, ensure the server is running first (suggest `/start-app` if not)7475### Phase 1: Initial Page Load & Snapshot7677Navigate to the target URL and capture the initial state:78791. **Navigate to the app:**80 Use `browser_navigate` to open the target URL.81822. **Take accessibility snapshot:**83 Use `browser_snapshot` to get the full page structure. This returns a structured representation of all interactive elements, text content, links, buttons, forms, and navigation.84853. **Take a screenshot for visual reference:**86 Use `browser_take_screenshot` to capture the initial visual state.87884. **Analyze the page structure:**89 From the snapshot, identify:90 - Navigation menus and links91 - Buttons and interactive elements92 - Forms and input fields93 - Main content areas94 - Dynamic elements (dropdowns, modals, tabs)95 - Error messages or broken elements9697### Phase 2: Plan Test Scenarios9899Based on the page snapshot, plan test scenarios organized by priority:100101#### 2.1 Critical Path Tests (always run)102- **Page loads successfully** — no error states, main content renders103- **Navigation works** — all nav links are clickable and lead to valid pages104- **No console errors** — check `browser_console_messages` for errors105- **No broken network requests** — check `browser_network_requests` for failed calls106107#### 2.2 Interactive Element Tests108- **Buttons** — click each visible button and verify expected behavior109- **Links** — verify internal links navigate correctly, external links exist110- **Forms** — fill in form fields and submit, verify validation messages111- **Dropdowns/Selects** — open and select options112- **Tabs/Accordions** — toggle and verify content changes113- **Modals/Dialogs** — trigger and verify they open/close properly114115#### 2.3 Content Validation Tests116- **Text content** — verify headings, paragraphs, and labels are present117- **Images** — verify images load (no broken image indicators)118- **Lists/Tables** — verify data renders correctly119- **Dynamic content** — verify content loads after API calls120121#### 2.4 User Flow Tests (if applicable)122Identify common user flows based on the app type:123- **Auth apps** — login/signup/logout flow124- **E-commerce** — browse/add to cart/checkout flow125- **Forms** — fill/validate/submit flow126- **Dashboards** — navigate between views, filter/sort data127- **Landing pages** — CTA buttons, anchor links, contact forms128129### Phase 3: Execute Tests130131Run each test scenario using Playwright MCP tools. For each test:1321331. **Snapshot before action** — use `browser_snapshot` to understand current state1342. **Perform the action** — use the appropriate Playwright MCP tool:135 - `browser_click` — for buttons, links, tabs136 - `browser_type` — for text inputs137 - `browser_fill_form` — for multiple form fields138 - `browser_select_option` — for dropdowns139 - `browser_press_key` — for keyboard interactions (Enter, Escape, Tab)140 - `browser_hover` — for hover states and tooltips141 - `browser_navigate` — for direct URL navigation142 - `browser_navigate_back` — to return to previous page1433. **Snapshot after action** — use `browser_snapshot` to verify the result1444. **Validate** — check that the expected outcome occurred:145 - Element appeared/disappeared146 - Text changed147 - Page navigated148 - Form submitted successfully149 - Error message displayed for invalid input1505. **Screenshot on failure** — if a test fails, use `browser_take_screenshot` to capture the failure state151152#### Test Execution Rules153- **Wait for dynamic content** — use `browser_wait_for` when expecting async changes154- **Handle dialogs** — use `browser_handle_dialog` if alerts/confirms appear155- **Check console** — periodically use `browser_console_messages` to catch JS errors156- **Check network** — use `browser_network_requests` to catch failed API calls157- **Navigate back** — after testing a sub-page, navigate back to continue testing158- **Use tabs** — use `browser_tabs` to manage multiple pages if needed159160### Phase 4: Multi-Page Testing161162If the app has multiple pages/routes:1631641. **Collect all navigation links** from the snapshot1652. **Visit each page** and run Phase 1 (snapshot + basic validation) on each1663. **Test cross-page flows** (e.g., add to cart on page A, verify cart on page B)1674. **Test browser back/forward** navigation168169For single-page apps (SPAs):170- Test client-side routing by clicking nav elements171- Verify URL changes in the browser172- Test deep linking by navigating directly to routes173174### Phase 5: Mobile Responsiveness Testing175176After desktop testing, resize the browser to test mobile-friendliness across common device viewports. This phase ensures the app works well on phones and tablets.177178#### 5.1 Define Test Viewports179180Test at these standard device sizes (width x height):181182| Device | Width | Height | Category |183|--------|-------|--------|----------|184| iPhone SE | 375 | 667 | Small phone |185| iPhone 14 / 15 | 390 | 844 | Standard phone |186| iPhone 14 Pro Max | 430 | 932 | Large phone |187| iPad Mini | 768 | 1024 | Small tablet |188| iPad Air / Pro | 820 | 1180 | Standard tablet |189190**At minimum, always test these 3 viewports:**1911. **Small phone** (375×667) — catches tight layout issues1922. **Standard phone** (390×844) — most common mobile device1933. **Tablet** (768×1024) — catches tablet breakpoint issues194195#### 5.2 Mobile Test Execution196197For **each viewport**, perform the following:1981991. **Resize the browser:**200 Use `browser_resize` to set the viewport dimensions:201 ```202 browser_resize(width: 375, height: 667) // iPhone SE203 ```2042052. **Navigate to the main page:**206 Use `browser_navigate` to reload the app at the target URL (ensures fresh responsive layout).2072083. **Take a screenshot:**209 Use `browser_take_screenshot` to capture the mobile layout for visual reference.2102114. **Take an accessibility snapshot:**212 Use `browser_snapshot` to get the page structure at this viewport size.2132145. **Check for mobile layout issues:**215 - **Horizontal overflow** — look for horizontal scrollbars or content extending beyond the viewport. Use `browser_evaluate` to check:216 ```javascript217 () => document.documentElement.scrollWidth > document.documentElement.clientWidth218 ```219 - **Viewport meta tag** — verify the page has a proper viewport meta tag. Use `browser_evaluate`:220 ```javascript221 () => {222 const meta = document.querySelector('meta[name="viewport"]');223 return meta ? meta.getAttribute('content') : 'MISSING';224 }225 ```226 - **Touch target sizes** — verify buttons and links are at least 44x44px for tap accessibility. Use `browser_evaluate`:227 ```javascript228 () => {229 const issues = [];230 document.querySelectorAll('a, button, [role="button"], input, select, textarea').forEach(el => {231 const rect = el.getBoundingClientRect();232 if (rect.width > 0 && rect.height > 0 && (rect.width < 44 || rect.height < 44)) {233 issues.push({ tag: el.tagName, text: el.textContent?.slice(0, 30), width: Math.round(rect.width), height: Math.round(rect.height) });234 }235 });236 return issues.length > 0 ? issues : 'ALL PASS';237 }238 ```239 - **Text readability** — check that body font size is at least 16px (prevents auto-zoom on iOS). Use `browser_evaluate`:240 ```javascript241 () => {242 const body = document.body;243 const fontSize = parseFloat(window.getComputedStyle(body).fontSize);244 const inputs = document.querySelectorAll('input, textarea, select');245 const smallInputs = [];246 inputs.forEach(el => {247 const size = parseFloat(window.getComputedStyle(el).fontSize);248 if (size < 16) smallInputs.push({ tag: el.tagName, type: el.type, fontSize: size });249 });250 return { bodyFontSize: fontSize, inputsBelow16px: smallInputs.length > 0 ? smallInputs : 'NONE' };251 }252 ```2532546. **Test mobile navigation:**255 - **Hamburger menu** — look for a hamburger/menu icon button in the snapshot. If found:256 - Click it with `browser_click`257 - Snapshot to verify the mobile nav menu opens258 - Verify all navigation links are visible and clickable259 - Click each nav link to verify it works260 - Verify the menu can be closed (click hamburger again, click outside, or press Escape)261 - **Sticky/fixed headers** — scroll down and verify header stays visible if sticky. Use `browser_evaluate`:262 ```javascript263 () => {264 window.scrollTo(0, 500);265 const header = document.querySelector('header, nav, [role="banner"]');266 if (!header) return 'NO HEADER FOUND';267 const rect = header.getBoundingClientRect();268 return { isVisible: rect.top >= 0 && rect.bottom <= window.innerHeight, top: rect.top };269 }270 ```271 - **Bottom navigation** — if a mobile bottom nav exists, verify it stays fixed at bottom2722737. **Test mobile-specific interactions:**274 - **Scroll behavior** — use `browser_evaluate` to scroll and verify smooth scrolling works:275 ```javascript276 () => { window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' }); return 'scrolled to bottom'; }277 ```278 - **Forms on mobile** — verify form fields are usable (not hidden behind keyboard, proper input types)279 - **Modals/overlays** — if tested in desktop phase, re-test that modals fit within mobile viewport280 - **Images** — verify images scale down and don't overflow the viewport281 - **Tables** — check if tables have horizontal scroll wrappers or responsive alternatives2822838. **Test content stacking:**284 - Verify multi-column layouts properly stack to single-column on mobile285 - Check that sidebars collapse or move below main content286 - Verify cards/grid items reflow properly287288#### 5.3 Responsive Breakpoint Transitions289290After testing individual viewports, test the transition between breakpoints:2912921. Start at desktop (1280×800) with `browser_resize`2932. Step down through breakpoints:294 - 1024×768 (small desktop / landscape tablet)295 - 768×1024 (tablet portrait)296 - 390×844 (phone)2973. At each step, take a snapshot and screenshot to verify:298 - Layout transitions smoothly (no broken intermediate states)299 - Navigation switches between desktop and mobile modes at an appropriate breakpoint300 - Content remains accessible at every width301302#### 5.4 Restore Desktop Viewport303304After mobile testing, restore the browser to desktop size:305```306browser_resize(width: 1280, height: 800)307```308309### Phase 6: Generate Test Report310311After all tests complete, generate a structured report:312313```314## Test Report315316**Target:** <URL>317**Date:** <current date/time>318**Total Tests:** <count>319**Passed:** <count> | **Failed:** <count> | **Skipped:** <count>320321### Results322323| # | Test | Status | Details |324|---|------|--------|---------|325| 1 | Page loads successfully | PASS | Main content rendered in <X>ms |326| 2 | Navigation - Home link | PASS | Navigated to / |327| 3 | Navigation - About link | PASS | Navigated to /about |328| 4 | Login form submission | FAIL | Expected redirect, got validation error |329| 5 | Contact form - empty submit | PASS | Validation messages displayed |330| ... | ... | ... | ... |331332### Failures333334#### Test 4: Login form submission335- **Action:** Filled email/password and clicked Submit336- **Expected:** Redirect to dashboard337- **Actual:** Validation error "Invalid credentials"338- **Screenshot:** [captured]339340### Console Errors341- [error] Failed to load resource: /api/users (404)342- [warning] React: Each child in a list should have a unique "key" prop343344### Network Issues345- GET /api/users → 404 Not Found346- POST /api/login → 500 Internal Server Error347348### Mobile Responsiveness349350| Viewport | Status | Issues |351|----------|--------|--------|352| iPhone SE (375×667) | PASS/FAIL | Details |353| iPhone 14 (390×844) | PASS/FAIL | Details |354| iPad Mini (768×1024) | PASS/FAIL | Details |355356#### Mobile Issues Found357- **Horizontal overflow** on iPhone SE — content extends 40px beyond viewport358- **Touch targets too small** — 3 buttons under 44px height on mobile nav359- **Missing viewport meta tag** — page does not have `<meta name="viewport">`360- **Input font size < 16px** — email input has 14px font (causes iOS auto-zoom)361- **Hamburger menu not functional** — menu icon present but click has no effect362363### Recommendations364- Fix the /api/users endpoint returning 404365- Add proper error handling for login failures366- Add alt text to images on the homepage367- Add `<meta name="viewport" content="width=device-width, initial-scale=1">` if missing368- Increase touch target sizes to minimum 44×44px369- Set input font sizes to at least 16px to prevent iOS auto-zoom370- Add responsive breakpoints for mobile layouts371```372373### Phase 7: Cleanup374375After testing:3761. Close the browser with `browser_close`3772. Display the test report to the user3783. If failures were found, offer to:379 - Investigate specific failures in more detail380 - Re-run failed tests after fixes381 - Take additional screenshots382383## Advanced Usage384385### Testing with Arguments386387Users can pass specific test targets:388389- `/test-app` — auto-detect URL, run all tests390- `/test-app http://localhost:3000` — test specific localhost391- `/test-app https://mysite.com` — test remote site392- `/test-app https://mysite.com/login` — test specific page393- `/test-app --forms` — focus on form testing394- `/test-app --nav` — focus on navigation testing395- `/test-app --a11y` — focus on accessibility checks396- `/test-app --mobile` — focus on mobile responsiveness testing only397- `/test-app --responsive` — run full responsive test across all viewports398399### Testing Remote vs Local400401**Localhost testing:**402- Can test with hot-reload (changes reflect immediately)403- Can test authenticated flows with test credentials404- Can test API endpoints directly405406**Remote/live site testing:**407- Tests the deployed production build408- Validates CDN, SSL, and production configs409- Can catch deployment-specific issues410- Respects rate limits and avoids destructive actions (no form submissions with real data unless explicitly requested)411412## Capabilities413414- Navigate to any localhost or remote URL via Playwright MCP415- Take accessibility snapshots to understand full page structure416- Click buttons, links, tabs, and any interactive elements417- Fill and submit forms with test data418- Validate page content, navigation, and UI behavior419- Capture screenshots for visual verification and failure documentation420- Check browser console for JavaScript errors421- Monitor network requests for failed API calls422- Test multi-page flows and SPA client-side routing423- Handle browser dialogs (alerts, confirms, prompts)424- **Test mobile responsiveness** by resizing to phone/tablet viewports (iPhone SE, iPhone 14, iPad Mini, etc.)425- **Detect mobile layout issues** — horizontal overflow, small touch targets, missing viewport meta, font size issues426- **Test mobile navigation** — hamburger menus, sticky headers, bottom nav bars427- **Verify responsive breakpoint transitions** — layout changes smoothly from desktop to mobile428- Generate structured test reports with pass/fail results including mobile responsiveness section429430## Notes431432- This skill requires Playwright MCP to be configured in Claude Code433- For localhost testing, ensure the app is running first (use `/start-app` if needed)434- The skill does NOT modify any application code — it only reads and interacts via the browser435- Remote site testing avoids destructive actions by default (no real purchases, account deletions, etc.)436- Form testing uses obviously fake test data (e.g., test@example.com, "Test User")437- Screenshots are captured for failures to help debug issues438- Console and network errors are always checked even if not explicitly requested