qualiow-exploratory-testing 1.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/.claude-plugin/plugin.json +22 -0
  2. package/.env.example +27 -0
  3. package/CHANGELOG.md +194 -0
  4. package/README.md +428 -179
  5. package/agents/qa-gather-agent.md +24 -0
  6. package/{scripts → bin}/doctor-mobile.sh +57 -18
  7. package/bin/mcli +15 -9
  8. package/bin/mobile-cli.mjs +574 -286
  9. package/{scripts → bin}/setup-mobile.sh +56 -19
  10. package/bin/wadb +10 -4
  11. package/bin/wk-ios +29 -17
  12. package/bin/wkeval.mjs +7 -1
  13. package/data/domains/_default.yml +1 -1
  14. package/data/domains/identity.yml +138 -0
  15. package/data/knowledge/changelog.yml +104 -0
  16. package/data/knowledge/learned-patterns.md +172 -86
  17. package/data/knowledge/manifest.yml +481 -70
  18. package/data/knowledge/releases/v0.1.0/entries/technique-business-logic-race-conditions.yml +1 -1
  19. package/data/knowledge/releases/v0.1.0/release.yml +8 -1
  20. package/data/knowledge/releases/v0.2.0/entries/technique-contract-narrowing.yml +150 -0
  21. package/data/knowledge/releases/v0.2.0/entries/technique-test-suite-audit.yml +116 -0
  22. package/data/knowledge/releases/v0.2.0/release.yml +20 -0
  23. package/data/knowledge/releases/v0.3.0/entries/technique-functional-diff-analysis.yml +119 -0
  24. package/data/knowledge/releases/v0.3.0/entries/technique-llm-output-verification.yml +102 -0
  25. package/data/knowledge/releases/v0.3.0/entries/technique-verification-mode-selection.yml +153 -0
  26. package/data/knowledge/releases/v0.3.0/release.yml +25 -0
  27. package/data/knowledge/releases/v0.4.0/entries/technique-authenticated-api-probing.yml +137 -0
  28. package/data/knowledge/releases/v0.4.0/entries/technique-environment-fingerprinting.yml +113 -0
  29. package/data/knowledge/releases/v0.4.0/entries/technique-silent-failure-audit.yml +86 -0
  30. package/data/knowledge/releases/v0.4.0/entries/technique-ui-api-differential.yml +97 -0
  31. package/data/knowledge/releases/v0.4.0/release.yml +28 -0
  32. package/data/knowledge/releases/v0.5.0/entries/technique-config-surface-verification.yml +77 -0
  33. package/data/knowledge/releases/v0.5.0/entries/technique-derived-value-verification.yml +81 -0
  34. package/data/knowledge/releases/v0.5.0/entries/technique-expected-behaviour-specification.yml +97 -0
  35. package/data/knowledge/releases/v0.5.0/entries/technique-presentation-integrity.yml +78 -0
  36. package/data/knowledge/releases/v0.5.0/entries/technique-release-readiness-verification.yml +110 -0
  37. package/data/knowledge/releases/v0.5.0/release.yml +33 -0
  38. package/data/knowledge/releases/v0.6.0/entries/technique-async-callback-contracts.yml +98 -0
  39. package/data/knowledge/releases/v0.6.0/entries/technique-exactly-once-verification.yml +116 -0
  40. package/data/knowledge/releases/v0.6.0/release.yml +30 -0
  41. package/data/security/SECURITY-POLICY.md +273 -0
  42. package/data/targets/_default.yml +1 -1
  43. package/data/targets/_example-api-only.yml +80 -0
  44. package/data/targets/_example-backend.yml +123 -0
  45. package/data/targets/_example-mobile-emulation.yml +2 -2
  46. package/data/targets/_example-native-mobile.yml +2 -2
  47. package/data/targets/_example-sim-android-chrome.yml +1 -1
  48. package/data/targets/_example-sim-ios-safari.yml +1 -1
  49. package/data/templates/api-probe-matrix.md +99 -0
  50. package/data/templates/bug-report.md +29 -151
  51. package/data/templates/coverage-map.md +23 -6
  52. package/data/templates/expected-behaviour.md +94 -0
  53. package/data/templates/session-charter.md +3 -0
  54. package/data/templates/session-report.md +57 -80
  55. package/dist/cli/index.js +1500 -739
  56. package/dist/index.d.ts +673 -75
  57. package/dist/index.js +1664 -270
  58. package/docs/BACKEND-VERIFICATION.md +307 -0
  59. package/docs/GETTING-STARTED.md +188 -128
  60. package/docs/MOBILE-SETUP.md +149 -18
  61. package/package.json +32 -16
  62. package/skills/qa-explore/SKILL.md +31 -25
  63. package/skills/qa-explore/phases/00-setup.md +67 -41
  64. package/skills/qa-explore/phases/01-auth.md +32 -15
  65. package/skills/qa-explore/phases/02-charter.md +16 -5
  66. package/skills/qa-explore/phases/03-discovery.md +50 -26
  67. package/skills/qa-explore/phases/04-journeys.md +2 -2
  68. package/skills/qa-explore/phases/05-features.md +39 -24
  69. package/skills/qa-explore/phases/06-edge-cases.md +24 -13
  70. package/skills/qa-explore/phases/07-reporting.md +79 -140
  71. package/skills/qa-explore/references/context-integration.md +1 -1
  72. package/skills/qa-explore/references/output-contract.md +187 -0
  73. package/skills/qa-explore/references/paths.md +84 -0
  74. package/skills/qa-explore/references/playwright-agents-integration.md +61 -84
  75. package/skills/qa-explore/references/security-rules.md +66 -25
  76. package/skills/qa-explore/references/severity-guide.md +31 -4
  77. package/skills/qa-explore-cleanup/SKILL.md +17 -6
  78. package/skills/qa-explore-feedback/SKILL.md +18 -5
  79. package/skills/qa-explore-mobile/SKILL.md +86 -64
  80. package/skills/qa-explore-mobile/phases/00-setup.md +71 -62
  81. package/skills/qa-explore-mobile/phases/01-auth.md +28 -31
  82. package/skills/qa-explore-mobile/phases/02-charter.md +8 -4
  83. package/skills/qa-explore-mobile/phases/03-discovery.md +17 -11
  84. package/skills/qa-explore-mobile/phases/04-journeys.md +6 -6
  85. package/skills/qa-explore-mobile/phases/05-features.md +9 -9
  86. package/skills/qa-explore-mobile/phases/06-edge-cases.md +35 -40
  87. package/skills/qa-explore-mobile/phases/07-reporting.md +82 -56
  88. package/skills/qa-explore-mobile/references/mobile-edges.md +26 -26
  89. package/skills/qa-explore-quick/SKILL.md +60 -25
  90. package/skills/qa-explore-report/SKILL.md +40 -34
  91. package/skills/qa-gather/SKILL.md +17 -2
  92. package/skills/qa-knowledge-add/SKILL.md +20 -9
  93. package/skills/qa-knowledge-list/SKILL.md +12 -3
  94. package/skills/qa-target-setup/SKILL.md +63 -41
  95. package/skills/qa-verify-backend/SKILL.md +172 -0
  96. package/skills/qa-verify-backend/phases/00-setup.md +142 -0
  97. package/skills/qa-verify-backend/phases/01-ac-decomposition.md +58 -0
  98. package/skills/qa-verify-backend/phases/02-static-review.md +71 -0
  99. package/skills/qa-verify-backend/phases/03-live-verification.md +62 -0
  100. package/skills/qa-verify-backend/phases/03b-api-verification.md +170 -0
  101. package/skills/qa-verify-backend/phases/04-e2e-trigger.md +82 -0
  102. package/skills/qa-verify-backend/phases/05-reporting.md +163 -0
  103. package/skills/qa-verify-backend/references/api-probes.md +168 -0
  104. package/skills/qa-verify-backend/references/aws-readonly-probes.md +156 -0
  105. package/skills/qa-verify-backend/references/environment-fingerprinting.md +104 -0
  106. package/skills/qa-verify-backend/references/payload-verification.md +112 -0
  107. package/skills/qa-verify-backend/references/release-readiness.md +97 -0
  108. package/skills/qa-verify-backend/references/safety-rules.md +95 -0
  109. package/dist/cli/index.d.ts +0 -1
  110. package/dist/cli/index.js.map +0 -1
  111. package/dist/index.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  # Phase 2: Business Context & Charter (Mobile)
2
2
 
3
- Follow `../../qa-explore/phases/02-charter.md` for the structure (use the app as a user,
3
+ Follow `${CLAUDE_SKILL_DIR}/../qa-explore/phases/02-charter.md` for the structure (use the app as a user,
4
4
  identify journeys, risk-rank, select heuristics, write charter). The mobile additions below
5
5
  apply to both modes.
6
6
 
7
7
  ## Use the app as a real user — for ~3 min
8
8
 
9
- Drive the system under test via `$MCLI snapshot` → `click` → `snapshot` loops to reach entry
9
+ Drive the system under test via `qa/bin/mcli snapshot` → `click` → `snapshot` loops to reach entry
10
10
  points (NATIVE: navigate the app's screens; WEB: `open-url` plus in-page links). Don't test
11
11
  yet — just observe what it exists to do, on a phone-sized screen, the way a real mobile user
12
12
  would. Note the primary task, where money/data/trust is at stake, and what a frustrated user
@@ -44,13 +44,17 @@ dimension** appropriate to the feature under charter, e.g.:
44
44
  Replace qa-explore's `tracing-start` with a video:
45
45
 
46
46
  ```bash
47
- $MCLI record-start output/sessions/<session-dir>/videos/session.mp4
47
+ qa/bin/mcli record-start output/sessions/<session-dir>/videos/session.mp4 # a real .mp4 on both platforms
48
48
  ```
49
49
 
50
+ On **Android** one recording is capped at 180 s and everything after it is lost with no
51
+ error: `record-stop` / `record-start` per journey instead of one session-long clip. iOS has
52
+ no cap.
53
+
50
54
  If recording fails or is too heavy, take frequent screenshots instead. Recording is
51
55
  nice-to-have, not required.
52
56
 
53
- ## Charter additions (append to the qa-explore charter template)
57
+ ## Charter additions (append to the qa-explore charter template; confidentiality header first)
54
58
 
55
59
  ```markdown
56
60
  ## Mobile Context
@@ -1,6 +1,6 @@
1
1
  # Phase 3: Discovery & Mapping (Mobile)
2
2
 
3
- Follow `../../qa-explore/phases/03-discovery.md` for goal and method (map structure,
3
+ Follow `${CLAUDE_SKILL_DIR}/../qa-explore/phases/03-discovery.md` for goal and method (map structure,
4
4
  refine risk). The substitutions below apply to both modes.
5
5
 
6
6
  ## Map screens/views by name + nav path (not URLs)
@@ -10,9 +10,9 @@ the nav path through the app; WEB: the URL that `open-url`/a link loaded, record
10
10
  For each reachable screen/view:
11
11
 
12
12
  ```bash
13
- $MCLI snapshot
14
- $MCLI screenshot output/sessions/<session-dir>/screenshots/discovery-<view>.png
15
- $MCLI logs --errors --since 30
13
+ qa/bin/mcli snapshot # refs expire after 60 s — re-snapshot before acting
14
+ qa/bin/mcli screenshot output/sessions/<session-dir>/screenshots/discovery-<view>.png
15
+ qa/bin/mcli logs --errors --since 30
16
16
  ```
17
17
 
18
18
  Log each: `[DISCOVERED] <view-name> — <one-line description> — Risk: <P0/P1/P2/P3> — entry: <how-to-reach>`
@@ -22,18 +22,23 @@ Log each: `[DISCOVERED] <view-name> — <one-line description> — Risk: <P0/P1/
22
22
  `snapshot` reads the device **accessibility tree, not the DOM**, so you identify elements by
23
23
  their **visible text and accessibility labels** (headings, links, buttons, inputs), not by
24
24
  CSS selectors or a fixed testID map. Read the live snapshot tree on each view. When a control
25
- has no usable accessible label, fall back to tapping its coordinates from `snapshot --full`.
25
+ has no usable accessible label, fall back to `snapshot --full`, which assigns a ref to every
26
+ bounded node — `click <ref>` taps that node's centre on both platforms. A raw coordinate tap
27
+ exists only on Android (`qa/bin/wadb shell input tap <x> <y>`); the driver has no iOS
28
+ equivalent.
26
29
 
27
30
  ## App/browser log instead of console
28
31
 
29
32
  Replace `playwright-cli console error` with:
30
33
 
31
34
  ```bash
32
- $MCLI logs --errors --since 60
35
+ qa/bin/mcli logs --errors --since 60
33
36
  ```
34
37
 
35
- Caveat: this is the **process log** (logcat / `simctl spawn log show` scoped to the
36
- app/browser process). In WEB mode it is the BROWSER's log, NOT the page's JS console, so it
38
+ Caveat: this is the **process log**, and only iOS is process-scoped: `simctl spawn log show`
39
+ filters on the app/browser process, while Android's `logcat` is the **whole device** at `*:E`
40
+ / `*:W` (last 400 lines), so lines from other packages appear — correlate by tag/pid before
41
+ attributing one to the app. In WEB mode it is the BROWSER's log, NOT the page's JS console, so it
37
42
  catches gross failures (renderer crashes) but misses most page-level `console.error`. In
38
43
  NATIVE mode it is the app's own log (crashes, native exceptions, bridge errors). Treat a clean
39
44
  log as "no gross crash", not "no errors". Still watch for:
@@ -65,12 +70,13 @@ Beyond the qa-explore "what's not here" check, ask:
65
70
  On iOS, some views **aggregate child elements into one parent accessibility label** (e.g. a
66
71
  form returns one big comma-joined label of several fields). When you see a single ref with a
67
72
  comma-joined label of many controls, that's an iOS a11y aggregation issue — file as a Medium
68
- bug (it blocks automation and hurts VoiceOver users) and tap by approximate coordinates from
69
- the snapshot bounds for the rest of the session on that view.
73
+ bug (it blocks automation and hurts VoiceOver users) and drive that view with
74
+ `snapshot --full` refs for the rest of the session (on Android you can also fall back to
75
+ `qa/bin/wadb shell input tap <x> <y>`; iOS has no raw-coordinate tap).
70
76
 
71
77
  ## After Discovery
72
78
 
73
- Write findings to `phase-1-discovery.md` including:
79
+ Write findings to `phase-3-discovery.md` (confidentiality header first) including:
74
80
  - View map (table: view → key visible labels/controls → entry path → URL if known)
75
81
  - Log error summary (count by level) with the browser-log caveat noted
76
82
  - iOS a11y aggregation hits (if any)
@@ -1,6 +1,6 @@
1
1
  # Phase 4: End-to-End User Journeys (Mobile)
2
2
 
3
- Follow `../../qa-explore/phases/04-journeys.md` for goal and the data-integrity
3
+ Follow `${CLAUDE_SKILL_DIR}/../qa-explore/phases/04-journeys.md` for goal and the data-integrity
4
4
  discipline. Build the journey templates from the charter's top user goals. Generic
5
5
  mobile journey shapes to instantiate (apply to both modes):
6
6
 
@@ -10,7 +10,7 @@ mobile journey shapes to instantiate (apply to both modes):
10
10
  2. **Create / edit / save** — create or edit a record, save it, navigate away and back, confirm the change is reflected (not just an optimistic UI that drops on reload/relaunch).
11
11
  3. **Multi-step flow / wizard** — go through a multi-step flow start to finish; then go partway, back out, and resume — does it preserve or correctly reset state?
12
12
  4. **Cross-screen consistency** — a value shown on one screen (a count, total, status, balance, name) matches everywhere else it appears.
13
- 5. **Deep entry** — reach a deep screen directly (NATIVE: deep link via `$MCLI deep-link`; WEB: `open-url` a deep view) rather than navigating from home — does it load with auth/context intact, or break?
13
+ 5. **Deep entry** — reach a deep screen directly (NATIVE: deep link via `qa/bin/mcli deep-link`; WEB: `open-url` a deep view) rather than navigating from home — does it load with auth/context intact, or break?
14
14
 
15
15
  Concrete examples:
16
16
  - **WEB:** login/SSO → landing; the core transactional journey end-to-end (e.g. search → product → basket → checkout); any onboarding wizard; editing settings and confirming persistence; exercising the mobile form elements (pickers, toggles, date/number inputs).
@@ -31,16 +31,16 @@ Log every check: `[DATA CHECK] <oracle> — expected: <X>, actual: <Y> — MATCH
31
31
  ## Lifecycle interleaving (mobile-only addition)
32
32
 
33
33
  For at least ONE journey, interrupt mid-flow and verify recovery:
34
- - Background the app/browser via `$MCLI press HOME` (Android) / home gesture (iOS), wait 30s, return — does state restore, or reload-and-lose-input?
35
- - Kill via `$MCLI stop`, relaunch via `$MCLI launch` (WEB: + `open-url`) — does in-progress work survive? Does auth survive?
36
- - Toggle airplane mode mid-submit (`bin/wadb shell svc wifi disable; bin/wadb shell svc data disable`) — does the app surface the failure cleanly or hang/silently drop the action? Re-enable to undo.
34
+ - Background the app/browser via `qa/bin/mcli press HOME` (both platforms — iOS goes through Maestro `pressKey: Home`), wait 30s, return — does state restore, or reload-and-lose-input?
35
+ - Kill via `qa/bin/mcli stop`, relaunch via `qa/bin/mcli launch` (WEB: + `open-url`) — does in-progress work survive? Does auth survive?
36
+ - Toggle airplane mode mid-submit (`qa/bin/wadb shell svc wifi disable; qa/bin/wadb shell svc data disable`) — does the app surface the failure cleanly or hang/silently drop the action? Re-enable to undo.
37
37
 
38
38
  These lifecycle results often surface the most impactful bugs (data loss, stuck states,
39
39
  silent failures, duplicate submissions).
40
40
 
41
41
  ## After Journeys
42
42
 
43
- Write findings to `phase-2-user-journeys.md` with:
43
+ Write findings to `phase-4-journeys.md` (confidentiality header first) with:
44
44
  - Journey-by-journey result (passed / failed / partial — and the WHY)
45
45
  - Data integrity table (oracle, expected, actual, pass/fail)
46
46
  - Lifecycle test results
@@ -1,6 +1,6 @@
1
1
  # Phase 5: Deep Feature Testing (Mobile)
2
2
 
3
- Follow `../../qa-explore/phases/05-features.md` for the SFDIPOT structure, boundary
3
+ Follow `${CLAUDE_SKILL_DIR}/../qa-explore/phases/05-features.md` for the SFDIPOT structure, boundary
4
4
  values, business-logic stress, and FEW HICCUPPS oracles. The mobile changes (both modes):
5
5
 
6
6
  ## Substitutions
@@ -11,15 +11,15 @@ values, business-logic stress, and FEW HICCUPPS oracles. The mobile changes (bot
11
11
  tooling (mitmproxy)"**. Do NOT invent a result. (You CAN still tamper values that travel in
12
12
  a deep link / URL via `deep-link`/`open-url` — see Phase 6.)
13
13
 
14
- - **`playwright-cli fill <ref> <long-string>`** — use the same patterns, but be aware the
15
- Android `input text` command silently truncates very long strings (~5000 chars max on most
16
- emulators), so a "field accepted N chars" result may be a driver limit, not the app's.
14
+ - **`playwright-cli fill <ref> <long-string>`** — use the same patterns (`fill` types through a
15
+ Maestro `inputText` flow on both platforms), but very long strings can still be truncated by
16
+ the platform IME, so a "field accepted N chars" result may be a driver limit, not the app's.
17
17
  Note the truncation when reporting, and for true very-long tests prefer pasting via the
18
18
  clipboard:
19
19
  ```bash
20
- bin/wadb shell "echo '<very long string>' | xargs -I {} am broadcast -a clipper.set -e text '{}'"
21
- $MCLI click <input ref>
22
- # then long-press to paste — or use $MCLI fill with the actual string and note truncation
20
+ qa/bin/wadb shell "echo '<very long string>' | xargs -I {} am broadcast -a clipper.set -e text '{}'"
21
+ qa/bin/mcli click <input ref>
22
+ # then long-press to paste — or use qa/bin/mcli fill with the actual string and note truncation
23
23
  ```
24
24
 
25
25
  ## Generic mobile feature stress recipes
@@ -51,7 +51,7 @@ screens and web views alike — they replace the desktop-only Playwright specifi
51
51
  ### Navigation & routing
52
52
 
53
53
  - Hardware/gesture back (Android `press BACK`) vs in-screen back control — same destination?
54
- - Deep-link straight into a mid-flow screen (NATIVE: `$MCLI deep-link <app-scheme>`; WEB: `open-url`) — does it load with context or break?
54
+ - Deep-link straight into a mid-flow screen (NATIVE: `qa/bin/mcli deep-link <app-scheme>`; WEB: `open-url`) — does it load with context or break?
55
55
  - After a successful action, does back land somewhere sane (not re-submitting)?
56
56
 
57
57
  ### Submit / save actions
@@ -65,7 +65,7 @@ Concrete high-value targets:
65
65
 
66
66
  ## After Feature Testing
67
67
 
68
- Write `phase-3-feature-testing.md` with feature-by-feature notes. For each deferred test
68
+ Write `phase-5-features.md` (confidentiality header first) with feature-by-feature notes. For each deferred test
69
69
  (proxy-blocked, multi-device-blocked), record it explicitly in the coverage map so it shows
70
70
  up as a known gap in the report.
71
71
 
@@ -1,27 +1,21 @@
1
1
  # Phase 6: Edge Cases & Mobile-Specific (mode-aware)
2
2
 
3
- Follow `../../qa-explore/phases/06-edge-cases.md` for the saboteur mindset. Edges are tagged
3
+ Follow `${CLAUDE_SKILL_DIR}/../qa-explore/phases/06-edge-cases.md` for the saboteur mindset. Edges are tagged
4
4
  **[both]**, **[native]**, or **[web]** — run the ones that fit the resolved mode.
5
5
 
6
- Set up once per Bash block:
7
- ```bash
8
- export MOBILE_CLI_STATE=/tmp/<target>-state.json
9
- MCLI="$PWD/bin/mcli" # run from the repo root
10
- ```
11
-
12
6
  ## Dropped / limited (no DOM, no JS console)
13
7
 
14
8
  - **XSS execution assertions via `fill` [web]** — without DOM/console you can't confirm execution. You can still submit payloads and watch for gross breakage (crash, broken render, reflected unescaped text in the a11y tree).
15
9
  - **`route ... --status=500` network simulation [both]** — needs mitmproxy. **Deferred** — log scenarios that would benefit, run them once a proxy exists.
16
- - **Multi-session race [both]** — needs two emulators. **Deferred for v1.**
10
+ - **Multi-session race [both]** — needs two emulators. **Deferred.**
17
11
  - **`resize` viewport tests** — sim viewport is fixed. Use **rotation** instead (below).
18
12
 
19
13
  ## Kept (still useful on mobile)
20
14
 
21
- - **Unicode / emoji [both]** in inputs: `$MCLI fill <ref> "naïve café 🤑 العربية"`
22
- - **Whitespace-only [both]:** `$MCLI fill <ref> " "`
15
+ - **Unicode / emoji [both]** in inputs: `qa/bin/mcli fill <ref> "naïve café 🤑 العربية"`
16
+ - **Whitespace-only [both]:** `qa/bin/mcli fill <ref> " "`
23
17
  - **Extremely long [both]:** see the truncation caveat in `05-features.md`
24
- - **State manipulation via deep link / URL [both]:** NATIVE `$MCLI deep-link "<app-scheme>://<path>?<tampered>"`; WEB `$MCLI open-url "<base_url>/<deep view>?<tampered params>"`
18
+ - **State manipulation via deep link / URL [both]:** NATIVE `qa/bin/mcli deep-link "<app-scheme>://<path>?<tampered>"`; WEB `qa/bin/mcli open-url "<base_url>/<deep view>?<tampered params>"`
25
19
  - **Replay [both]:** double-tap submit; submit then back then re-submit
26
20
  - **Brute force / rate limits [both]:** repeated failed submissions/logins — lockout / cooldown?
27
21
 
@@ -31,21 +25,20 @@ MCLI="$PWD/bin/mcli" # run from the repo root
31
25
 
32
26
  ```bash
33
27
  # Background mid-flow
34
- $MCLI press HOME # Android
35
- # (iOS: use the home gesture/button via the Simulator; press HOME is Android-only)
28
+ qa/bin/mcli press HOME # both platforms (iOS via Maestro pressKey Home)
36
29
  sleep 30
37
- $MCLI launch # foreground — did state restore or reload-and-lose-state?
30
+ qa/bin/mcli launch # foreground — did state restore or reload-and-lose-state?
38
31
 
39
32
  # Kill mid-flow
40
- $MCLI stop
41
- $MCLI launch
33
+ qa/bin/mcli stop
34
+ qa/bin/mcli launch
42
35
  # WEB only: re-open the view you were on
43
- # $MCLI open-url <current view>
36
+ # qa/bin/mcli open-url <current view>
44
37
 
45
38
  # OS-initiated suspend (Android)
46
- bin/wadb shell am broadcast -a android.intent.action.SCREEN_OFF
39
+ qa/bin/wadb shell am broadcast -a android.intent.action.SCREEN_OFF
47
40
  sleep 5
48
- bin/wadb shell am broadcast -a android.intent.action.SCREEN_ON
41
+ qa/bin/wadb shell am broadcast -a android.intent.action.SCREEN_ON
49
42
  ```
50
43
 
51
44
  For each: did state survive? Was auth still valid? Did an in-progress action complete or
@@ -55,8 +48,8 @@ duplicate?
55
48
 
56
49
  NATIVE — deny / revoke / re-grant runtime permissions and check graceful handling:
57
50
  ```bash
58
- bin/wadb shell pm revoke <app.package> android.permission.CAMERA # then try the QR/camera feature
59
- bin/wadb shell pm grant <app.package> android.permission.CAMERA
51
+ qa/bin/wadb shell pm revoke <app.package> android.permission.CAMERA # then try the QR/camera feature
52
+ qa/bin/wadb shell pm grant <app.package> android.permission.CAMERA
60
53
  # iOS sim: xcrun simctl privacy <udid> reset|grant camera <app.bundle_id>
61
54
  ```
62
55
  Test camera / notifications / contacts / location. In WEB mode the same applies to the
@@ -69,7 +62,7 @@ If the app uses biometric auth: approve → succeeds; deny/cancel → password f
69
62
  disable biometrics in OS mid-flow → graceful fallback. Android emulator can simulate a
70
63
  fingerprint touch:
71
64
  ```bash
72
- bin/wadb -e emu finger touch 1
65
+ qa/bin/wadb -e emu finger touch 1
73
66
  ```
74
67
 
75
68
  ### Push notifications [native]
@@ -81,11 +74,13 @@ works; trigger a notification and tap it — does it deep-link to the right scre
81
74
 
82
75
  ```bash
83
76
  # Android — toggle network
84
- bin/wadb shell svc wifi disable && bin/wadb shell svc data disable
77
+ qa/bin/wadb shell svc wifi disable && qa/bin/wadb shell svc data disable
85
78
  # Run a submit/save flow — does it surface "offline" cleanly or hang/blank?
86
- bin/wadb shell svc wifi enable && bin/wadb shell svc data enable
79
+ qa/bin/wadb shell svc wifi enable && qa/bin/wadb shell svc data enable
87
80
 
88
- # Slow network: use the emulator console — telnet localhost 5554 → network speed gsm / network delay umts
81
+ # Slow network (Android emulator console via adb, no telnet):
82
+ qa/bin/wadb emu network speed gsm && qa/bin/wadb emu network delay umts
83
+ # restore: qa/bin/wadb emu network speed full && qa/bin/wadb emu network delay none
89
84
  ```
90
85
 
91
86
  Ask: does the app surface offline cleanly, queue or fail loudly, auto-retry, or just spin?
@@ -94,10 +89,10 @@ Ask: does the app surface offline cleanly, queue or fail loudly, auto-retry, or
94
89
 
95
90
  ```bash
96
91
  # Android
97
- bin/wadb shell settings put system accelerometer_rotation 0
98
- bin/wadb shell settings put system user_rotation 1 # landscape
99
- $MCLI snapshot # does the layout reflow? keyboard cover input?
100
- bin/wadb shell settings put system user_rotation 0 # portrait
92
+ qa/bin/wadb shell settings put system accelerometer_rotation 0
93
+ qa/bin/wadb shell settings put system user_rotation 1 # landscape
94
+ qa/bin/mcli snapshot # does the layout reflow? keyboard cover input?
95
+ qa/bin/wadb shell settings put system user_rotation 0 # portrait
101
96
  ```
102
97
 
103
98
  iOS sim: Cmd+Right/Left Arrow in the Simulator to rotate. Check reflow, clipping, and that
@@ -113,15 +108,15 @@ and submit correctly?
113
108
 
114
109
  ```bash
115
110
  # NATIVE — exercise the app's own scheme/intent:
116
- $MCLI deep-link "<app-scheme>://<a real path>"
117
- $MCLI deep-link "<app-scheme>://<path>?id=&n=NaN"
118
- bin/wadb shell am start -a android.intent.action.VIEW -d "<app-scheme>://<path>?x=$(python3 -c 'print("A"*5000)')"
111
+ qa/bin/mcli deep-link "<app-scheme>://<a real path>"
112
+ qa/bin/mcli deep-link "<app-scheme>://<path>?id=&n=NaN"
113
+ qa/bin/wadb shell am start -a android.intent.action.VIEW -d "<app-scheme>://<path>?x=$(python3 -c 'print("A"*5000)')"
119
114
 
120
115
  # WEB — exercise the target URL:
121
- $MCLI open-url "<base_url>/<a real deep view>"
122
- $MCLI open-url "<base_url>/<view>?id=&n=NaN"
123
- $MCLI open-url "<base_url>/<view>?next=javascript:alert(1)"
124
- $MCLI open-url "<base_url>/<view>?q=$(python3 -c 'print("A"*5000)')"
116
+ qa/bin/mcli open-url "<base_url>/<a real deep view>"
117
+ qa/bin/mcli open-url "<base_url>/<view>?id=&n=NaN"
118
+ qa/bin/mcli open-url "<base_url>/<view>?next=javascript:alert(1)"
119
+ qa/bin/mcli open-url "<base_url>/<view>?q=$(python3 -c 'print("A"*5000)')"
125
120
  ```
126
121
 
127
122
  Crash, freeze, blank screen, open-redirect, or accept-as-valid are all findings.
@@ -130,8 +125,8 @@ Crash, freeze, blank screen, open-redirect, or accept-as-valid are all findings.
130
125
 
131
126
  ```bash
132
127
  # Navigate to a view with sensitive data, then open Recents and screenshot the preview
133
- bin/wadb shell input keyevent KEYCODE_APP_SWITCH # Android Recents
134
- $MCLI screenshot output/sessions/<session-dir>/screenshots/recents-preview.png
128
+ qa/bin/wadb shell input keyevent KEYCODE_APP_SWITCH # Android Recents
129
+ qa/bin/mcli screenshot output/sessions/<session-dir>/screenshots/recents-preview.png
135
130
  ```
136
131
 
137
132
  Is sensitive data (account info, tokens-in-URL, personal data) visible in the Recents preview?
@@ -140,7 +135,7 @@ finding where it matters.
140
135
 
141
136
  ### Storage / data wipe
142
137
 
143
- - **NATIVE:** force-clear app data mid-flow (Android `$MCLI relaunch-clean` = force-stop + `pm clear`) — does it land on a clean welcome state or get stuck on an intermediate screen? Also test fresh-install vs upgrade if you have both builds.
138
+ - **NATIVE:** force-clear app data mid-flow (Android `qa/bin/mcli relaunch-clean` = force-stop + `pm clear` + launch) — does it land on a clean welcome state or get stuck on an intermediate screen? Also test fresh-install vs upgrade if you have both builds.
144
139
  - **WEB:** **do NOT use `relaunch-clean`** — on Android it `pm clear`s the *browser* and wipes the logged-in profile, forcing a fresh SSO+MFA login. If you need a cleared-cookie test, do it knowingly and expect to re-login.
145
140
  - Returning vs fresh state [both]: correct first-ever behavior (empty states, first-run interstitials) AND returning behavior.
146
141
 
@@ -151,7 +146,7 @@ extremes (very large numbers, long names, long localized strings at mobile width
151
146
 
152
147
  ## After Edge Cases
153
148
 
154
- Write `phase-4-edge-cases.md` with one section per category. Each deferred test gets a single
149
+ Write `phase-6-edge-cases.md` (confidentiality header first) with one section per category. Each deferred test gets a single
155
150
  line so it's visible.
156
151
 
157
152
  **Update progress.**
@@ -1,83 +1,107 @@
1
1
  # Phase 7: Reflection & Reporting (Mobile)
2
2
 
3
- Follow `../../qa-explore/phases/07-reporting.md` for the report structure, reflection
4
- questions, bug-report template, session-report template, and stats.json schema. The
5
- mobile additions (both modes):
3
+ Follow `${CLAUDE_SKILL_DIR}/../qa-explore/phases/07-reporting.md` for the reflection
4
+ questions and the report structure; every artefact uses the format in
5
+ `${CLAUDE_SKILL_DIR}/../qa-explore/references/output-contract.md` (confidentiality header
6
+ first). The mobile differences (both modes):
6
7
 
7
8
  ## Stop recording
8
9
 
9
- Replace `tracing-stop` with:
10
+ Replace `video-stop` / `tracing-stop` with:
10
11
 
11
12
  ```bash
12
- export MOBILE_CLI_STATE=/tmp/<target>-state.json
13
- MCLI="$PWD/bin/mcli" # run from the repo root
14
- $MCLI record-stop # closes the video (if record-start was used)
15
- $MCLI stop # close the app/browser — leaves the sim running for next time
13
+ qa/bin/mcli record-stop # closes the .mp4 (if record-start was used)
14
+ qa/bin/mcli stop # close the app/browser — leaves the sim running for next time
15
+ qa/bin/wk-ios --stop # iOS WEB mode only, if the DOM bridge was used
16
16
  ```
17
17
 
18
- Do NOT `relaunch-clean` / wipe the device at session end — in WEB mode this preserves the
19
- persisted login; in NATIVE mode it preserves any account/state created this session.
18
+ Do NOT `relaunch-clean` / wipe the device at session end: in WEB mode this preserves the
19
+ persisted login; in NATIVE mode it preserves any account/state created this session. There
20
+ is no playwright-cli session to `close` / `delete-data` on mobile.
20
21
 
21
- ## Bug-report — mobile fields
22
+ ## Bug report — mobile fields
22
23
 
23
- In each `bugs/BUG-NNN.md`, replace the qa-explore `Environment` line with:
24
+ Same file and headings as the contract — `bugs/BUG-NNN.md`, starting with the two-line
25
+ header, verbatim:
26
+
27
+ ```
28
+ > CONFIDENTIAL: This report may contain internal URLs, security vulnerabilities,
29
+ > and application details. Do not share outside your organization without review.
30
+ ```
31
+
32
+ then `# BUG-NNN: [Component] fails [Condition] causing [Impact]`, `**Severity:**`,
33
+ `**Priority:**`, `**Component:**`, `**URL:**`, `**Environment:**`,
34
+ `**Reproduction rate:**`, then `## Summary`, `## Expected Behavior`, `## Actual Behavior`,
35
+ `## Steps to Reproduce`, `## Business Impact`, `## Evidence` and
36
+ `## Recommended Fix Priority`. Two fields change on mobile:
24
37
 
25
38
  ```markdown
39
+ **URL:** <WEB: the page URL loaded via open-url | NATIVE: the screen name or deep link>
26
40
  **Environment:**
27
- - Mode: [native / web]
28
- - Platform: [android / ios]
29
- - Device: [emulator-5554 / iPhone 17 sim UDID]
30
- - OS version: [from `bin/wadb shell getprop ro.build.version.release` / `xcrun simctl`]
31
- - App under test: [native: app id + version + build type | web: browser bundle + version]
32
- - Target URL: [web mode only: base_url]
33
- - Environment: [preprod / staging / production]
41
+ - Mode: native | web
42
+ - Platform: android | ios
43
+ - Device: emulator-5554 | qa-iphone (UDID …)
44
+ - OS version: <android: qa/bin/wadb shell getprop ro.build.version.release — ios: xcrun simctl list runtimes>
45
+ - App under test: <native: app id + version + build type | web: browser bundle + version>
46
+ - Target URL: <web mode only: base_url>
47
+ - Environment: <preprod | staging | production>
34
48
  ```
35
49
 
36
- And add an **Evidence** block enriched for mobile:
50
+ And `## Evidence` carries the mobile artefacts:
37
51
 
38
52
  ```markdown
39
- ### Evidence
40
- - Screenshot: `screenshots/bug-NNN.png`
41
- - Video clip: `videos/bug-NNN.mp4` (if recorded)
42
- - Process log: `logs/bug-NNN.log` (logcat / simctl excerpt around the time of failure — app process in native mode, browser process in web mode, not a page JS console)
53
+ ## Evidence
54
+ - Screenshot: `screenshots/BUG-NNN.png`
55
+ - Video: `videos/BUG-NNN.mp4` (if recorded)
56
+ - Log: `logs/BUG-NNN.log` (logcat / simctl excerpt around the failure — iOS is scoped to the app/browser process, Android is whole-device logcat, and neither is a page JS console)
57
+ - Console errors: n/a on mobile (or the wk-ios observation, iOS WEB)
58
+ - Network failures: n/a (no proxy) — or "needs proxy capture"
43
59
  ```
44
60
 
45
- When you file a bug, capture the log at the moment of failure:
61
+ Capture the log at the moment of failure (the `logs/` directory was created in setup):
46
62
 
47
63
  ```bash
48
- $MCLI logs --since 30 --errors > output/sessions/<session-dir>/logs/bug-NNN.log
64
+ qa/bin/mcli screenshot output/sessions/<session-dir>/screenshots/BUG-NNN.png
65
+ qa/bin/mcli logs --since 30 --errors > output/sessions/<session-dir>/logs/BUG-NNN.log
49
66
  ```
50
67
 
68
+ Redact the log excerpt per `security-rules.md` before it is saved: process logs routinely
69
+ carry tokens and emails.
70
+
51
71
  ## Session report — mobile additions
52
72
 
53
- Append a "Mobile context" section to `session-report.md`:
73
+ `session-report.md` per the contract with `Kind: mobile`, then append after `## Session Stats`:
54
74
 
55
75
  ```markdown
56
76
  ## Mobile Context
57
77
 
58
78
  | Field | Value |
59
79
  |---|---|
60
- | Mode | [native / web] |
61
- | Platform | [android / ios] |
62
- | Device | [device label] |
63
- | OS version | [version] |
64
- | App under test | [native: app id + version + build type | web: browser bundle + version] |
65
- | Target URL | [web mode only: base_url + environment] |
66
- | mobile-cli version | [git sha of this repo] |
80
+ | Mode | native / web |
81
+ | Platform | android / ios |
82
+ | Device | <device label> |
83
+ | OS version | <version> |
84
+ | App under test | <native: app id + version + build type | web: browser bundle + version> |
85
+ | Target URL | <web mode only: base_url + environment> |
86
+ | Source state | <native: branch + sha + clean/dirty, if rebuilt> |
87
+ | Driver version | <output of `qa/bin/mcli version`> |
67
88
 
68
89
  ## Deferred Tests (require additional tooling)
69
90
 
70
91
  | Test | Why deferred | What's needed |
71
92
  |---|---|---|
72
- | Network failure simulation | mobile-cli v1 has no proxy | mitmproxy + cert install |
73
- | Multi-device race conditions | mobile-cli v1 single-device | Second emulator + parallel sessions |
74
- | Server-side parameter tampering (non-deep-link) | No script eval on device | Proxy + request modification |
93
+ | Network failure simulation | mobile-cli has no proxy | mitmproxy + cert install |
94
+ | Multi-device race conditions | single device | second emulator + parallel sessions |
95
+ | Server-side parameter tampering (non-deep-link) | no script eval on device | proxy + request modification |
75
96
  ```
76
97
 
98
+ Every deferred test also appears in the coverage map as `not-tested` with the reason, so it
99
+ shows up as a known gap.
100
+
77
101
  ## Requirements coverage cross-check (optional)
78
102
 
79
- If the session was scoped to gathered requirements / tickets, add a cross-check table — this
80
- is **not** test execution, it's "did exploration touch the areas those requirements
103
+ If the session was scoped to gathered requirements / tickets, add a cross-check table. This
104
+ is **not** test execution; it is "did exploration touch the areas those requirements
81
105
  designed?":
82
106
 
83
107
  ```markdown
@@ -90,25 +114,26 @@ Source: <ticket / acceptance criteria / gathered context>
90
114
  | ... | Yes/No/Partial | BUG-NNN or — | ... |
91
115
  ```
92
116
 
93
- The point is to surface coverage gaps the team can decide to fill manually or with automation.
94
-
95
117
  ## stats.json — mobile fields
96
118
 
97
- Append a `mobile` block to the qa-explore stats schema:
119
+ `stats.json` exactly as the contract defines it, with `"kind": "mobile"`, and the device
120
+ block under `coverage.mobile` (the schema is strict; no other top-level keys):
98
121
 
99
122
  ```json
100
- "mobile": {
101
- "mode": "web",
102
- "platform": "ios",
103
- "device": "iPhone 17",
104
- "app_under_test": "com.apple.mobilesafari",
105
- "target_url": "https://staging.m.example.com",
106
- "environment": "staging",
107
- "videos_recorded": 1,
108
- "log_errors_observed": 0,
109
- "lifecycle_tests_run": 0,
110
- "rotation_tests_run": 0,
111
- "deferred_tests": []
123
+ "coverage": {
124
+ "mobile": {
125
+ "mode": "web",
126
+ "platform": "ios",
127
+ "device": "qa-iphone",
128
+ "app_under_test": "com.apple.mobilesafari",
129
+ "target_url": "https://staging.m.example.com",
130
+ "environment": "staging",
131
+ "videos_recorded": 1,
132
+ "log_errors_observed": 0,
133
+ "lifecycle_tests_run": 0,
134
+ "rotation_tests_run": 0,
135
+ "deferred_tests": []
136
+ }
112
137
  }
113
138
  ```
114
139
 
@@ -116,8 +141,9 @@ Append a `mobile` block to the qa-explore stats schema:
116
141
 
117
142
  ## Update progress.json — final
118
143
 
119
- Same as qa-explore. Set `status: complete`, all phases to final status.
144
+ Same as qa-explore. Set `status: complete`, all phases to their final status.
120
145
 
121
146
  ## Update indexes
122
147
 
123
- Append the session to `output/sessions/INDEX.md`.
148
+ Append the session row to `output/sessions/INDEX.md` (`Kind` = `mobile`) and one row per
149
+ bug to `output/bugs/all-bugs.md`, in the column order defined in `paths.md`.