Skill Tracer
Skills › Compound Engineering › ce-test-browser › route-and-report.md

route-and-report.md

129 lines · skills/ce-test-browser/references/route-and-report.md at 3449230

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# Routes, server, and reporting
2
3Read this before mapping changed files to routes (workflow step 3). It carries the route-mapping starting points, the port and server commands, what to check on each page, the two human-facing prompts, and the summary format.
4

Routes, server, and reporting

Read this before mapping changed files to routes (workflow step 3). It carries the route-mapping starting points, the port and server commands, what to check on each page, the two human-facing prompts, and the summary format.

Raw lines 1 to 4
5## Map changed files to routes
6
7Map each changed file to the route(s) that render it, then build the list of URLs to test. The table below is a starting point of common patterns, not an exhaustive rule set — apply judgment for the project's actual layout:
8
9| File Pattern | Route(s) |
10|-------------|----------|
11| `app/views/users/*` | `/users`, `/users/:id`, `/users/new` |
12| `app/controllers/settings_controller.rb` | `/settings` |
13| `app/javascript/controllers/*_controller.js` | Pages using that Stimulus controller |
14| `app/components/*_component.rb` | Pages rendering that component |
15| `app/views/layouts/*` | All pages (test homepage at minimum) |
16| `app/assets/stylesheets/*` | Visual regression on key pages |
17| `app/helpers/*_helper.rb` | Pages using that helper |
18| `src/app/*` (Next.js) | Corresponding routes |
19| `src/components/*` | Pages using those components |

Map changed files to routes

Map each changed file to the route(s) that render it, then build the list of URLs to test. The table below is a starting point of common patterns, not an exhaustive rule set — apply judgment for the project's actual layout:

File PatternRoute(s)
app/views/users/*/users, /users/:id, /users/new
app/controllers/settings_controller.rb/settings
app/javascript/controllers/*_controller.jsPages using that Stimulus controller
app/components/*_component.rbPages rendering that component
app/views/layouts/*All pages (test homepage at minimum)
app/assets/stylesheets/*Visual regression on key pages
app/helpers/*_helper.rbPages using that helper
src/app/* (Next.js)Corresponding routes
src/components/*Pages using those components
Raw lines 5 to 20
21## Determine the port and verify the dev server is running
23`scripts/resolve-port.sh` resolves the port and prints it alone on stdout, so the shell call that needs it captures the value instead of a later step re-typing a printed number. Append the explicit port as an argument when you have one.
25```bash
26SKILL_DIR="<absolute path of the directory containing the SKILL.md you just read>";
27PORT=$(bash "$SKILL_DIR/scripts/resolve-port.sh");
28if lsof -i ":${PORT}" -sTCP:LISTEN -t >/dev/null 2>&1; then
29 echo "Server running on port ${PORT}";
30else
31 echo "Server not running on port ${PORT}";
32 echo "Start your dev server, then re-run:";
33 echo " Rails: bin/dev or rails server -p ${PORT}";
34 echo " Node/Next.js: npm run dev";
35 echo " Custom port: run this skill again with --port <your-port>";
36 exit 0;
37fi
38```

Determine the port and verify the dev server is running

scripts/resolve-port.sh resolves the port and prints it alone on stdout, so the shell call that needs it captures the value instead of a later step re-typing a printed number. Append the explicit port as an argument when you have one.

SKILL_DIR="<absolute path of the directory containing the SKILL.md you just read>";
PORT=$(bash "$SKILL_DIR/scripts/resolve-port.sh");
if lsof -i ":${PORT}" -sTCP:LISTEN -t >/dev/null 2>&1; then
  echo "Server running on port ${PORT}";
else
  echo "Server not running on port ${PORT}";
  echo "Start your dev server, then re-run:";
  echo "  Rails: bin/dev  or  rails server -p ${PORT}";
  echo "  Node/Next.js: npm run dev";
  echo "  Custom port: run this skill again with --port <your-port>";
  exit 0;
fi
Raw lines 21 to 39
Runs code scripts/resolve-port.sh :23
Runs code bin/dev :33
40## Test each affected page
42For each affected route, use the selected driver to navigate and capture fresh rendered or interactive state.
44**Verify key elements:**
45- Page title/heading present
46- Primary content rendered
47- No error messages visible
48- Forms have expected fields
49- No new console errors attributable to the tested flow
51**Test critical interactions:** derive locators or element references from the selected driver's latest inspected state, perform the click/fill/press action, then inspect the resulting state. Do not guess selectors or reuse stale references.
53**Take screenshots:** capture viewport and full-page evidence when the selected driver supports it. Materialize screenshots as local artifacts when a later workflow or report needs file paths; otherwise in-app evidence is sufficient.

Test each affected page

For each affected route, use the selected driver to navigate and capture fresh rendered or interactive state.

Verify key elements:

  • Page title/heading present
  • Primary content rendered
  • No error messages visible
  • Forms have expected fields
  • No new console errors attributable to the tested flow

Test critical interactions: derive locators or element references from the selected driver's latest inspected state, perform the click/fill/press action, then inspect the resulting state. Do not guess selectors or reuse stale references.

Take screenshots: capture viewport and full-page evidence when the selected driver supports it. Materialize screenshots as local artifacts when a later workflow or report needs file paths; otherwise in-app evidence is sufficient.

Raw lines 40 to 54
55## Human verification (when required)
57| Flow Type | What to Ask |
58|-----------|-------------|
59| OAuth | "Please sign in with [provider] and confirm it works" |
60| Email | "Check your inbox for the test email and confirm receipt" |
61| Payments | "Complete a test purchase in sandbox mode" |
62| SMS | "Verify you received the SMS code" |
63| External APIs | "Confirm the [service] integration is working" |
65Ask the user with the platform's question tool (the list is in SKILL.md step 6), or present numbered options and wait:
67```
68Human Verification Needed
70This test touches [flow type]. Please:
711. [Action to take]
722. [What to verify]
74Did it work correctly?
751. Yes - continue testing
762. No - describe the issue
77```

Human verification (when required)

Flow TypeWhat to Ask
OAuth"Please sign in with [provider] and confirm it works"
Email"Check your inbox for the test email and confirm receipt"
Payments"Complete a test purchase in sandbox mode"
SMS"Verify you received the SMS code"
External APIs"Confirm the [service] integration is working"

Ask the user with the platform's question tool (the list is in SKILL.md step 6), or present numbered options and wait:

Human Verification Needed

This test touches [flow type]. Please:
1. [Action to take]
2. [What to verify]

Did it work correctly?
1. Yes - continue testing
2. No - describe the issue
Raw lines 55 to 78
Involves a person Ask the user :65
Involves a person and wait :65
79## Handle failures
811. **Document the failure:**
82 - Capture a screenshot of the error state with the selected driver
83 - Note the exact reproduction steps
852. **Ask the user how to proceed:**
87 ```
88 Test Failed: [route]
90 Issue: [description]
91 Console errors: [if any]
93 How to proceed?
94 1. Fix now - debug and fix the failing test
95 2. Skip - continue testing other pages
96 ```
983. **If "Fix now":** investigate, propose a fix, apply, re-run the failing test
994. **If "Skip":** log as skipped, continue

Handle failures

  1. Document the failure:
  2. Capture a screenshot of the error state with the selected driver
  3. Note the exact reproduction steps
  1. Ask the user how to proceed:

``` Test Failed: [route]

Issue: [description] Console errors: [if any]

How to proceed?

  1. Fix now - debug and fix the failing test
  2. Skip - continue testing other pages ```
  1. If "Fix now": investigate, propose a fix, apply, re-run the failing test
  2. If "Skip": log as skipped, continue
Raw lines 79 to 100
Involves a person Ask the user :85
101## Test summary
103```markdown
104## Browser Test Results
106**Test Scope:** PR #[number] / [branch name]
107**Server:** http://localhost:<port>
109### Pages Tested: [count]
111| Route | Status | Notes |
112|-------|--------|-------|
113| `/users` | Pass | |
114| `/settings` | Pass | |
115| `/dashboard` | Fail | Console error: [msg] |
116| `/checkout` | Skip | Requires payment credentials |
118### Console Errors: [count]
119- [List any errors found]
121### Human Verifications: [count]
122- OAuth flow: Confirmed
123- Email delivery: Confirmed
125### Failures: [count]
126- `/dashboard` - [issue description]
128### Result: [PASS / FAIL / PARTIAL]
129```

Test summary

## Browser Test Results

**Test Scope:** PR #[number] / [branch name]
**Server:** http://localhost:<port>

### Pages Tested: [count]

| Route | Status | Notes |
|-------|--------|-------|
| `/users` | Pass | |
| `/settings` | Pass | |
| `/dashboard` | Fail | Console error: [msg] |
| `/checkout` | Skip | Requires payment credentials |

### Console Errors: [count]
- [List any errors found]

### Human Verifications: [count]
- OAuth flow: Confirmed
- Email delivery: Confirmed

### Failures: [count]
- `/dashboard` - [issue description]

### Result: [PASS / FAIL / PARTIAL]
Raw lines 101 to 129