@monkeytestai/monkeytester 0.7.0-beta.2 → 0.7.0-beta.4
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.
- package/CHANGELOG.md +52 -0
- package/README.md +152 -132
- package/dist/audit/cases.d.ts +9 -0
- package/dist/audit/cases.d.ts.map +1 -0
- package/dist/audit/cases.js +164 -0
- package/dist/audit/cases.js.map +1 -0
- package/dist/audit/falsePass.d.ts +41 -0
- package/dist/audit/falsePass.d.ts.map +1 -0
- package/dist/audit/falsePass.js +51 -0
- package/dist/audit/falsePass.js.map +1 -0
- package/dist/automation/signatures.d.ts.map +1 -1
- package/dist/automation/signatures.js +10 -0
- package/dist/automation/signatures.js.map +1 -1
- package/dist/budget.d.ts +23 -0
- package/dist/budget.d.ts.map +1 -0
- package/dist/budget.js +30 -0
- package/dist/budget.js.map +1 -0
- package/dist/checks/axe.d.ts +6 -0
- package/dist/checks/axe.d.ts.map +1 -1
- package/dist/checks/axe.js +15 -0
- package/dist/checks/axe.js.map +1 -1
- package/dist/checks/console.d.ts +4 -0
- package/dist/checks/console.d.ts.map +1 -1
- package/dist/checks/console.js +16 -1
- package/dist/checks/console.js.map +1 -1
- package/dist/checks/execute.d.ts +17 -1
- package/dist/checks/execute.d.ts.map +1 -1
- package/dist/checks/execute.js +93 -34
- package/dist/checks/execute.js.map +1 -1
- package/dist/checks/meta.d.ts +7 -4
- package/dist/checks/meta.d.ts.map +1 -1
- package/dist/checks/meta.js +8 -6
- package/dist/checks/meta.js.map +1 -1
- package/dist/checks/mobile.d.ts +8 -0
- package/dist/checks/mobile.d.ts.map +1 -1
- package/dist/checks/mobile.js +10 -3
- package/dist/checks/mobile.js.map +1 -1
- package/dist/checks/party.d.ts +19 -0
- package/dist/checks/party.d.ts.map +1 -0
- package/dist/checks/party.js +56 -0
- package/dist/checks/party.js.map +1 -0
- package/dist/checks/plan.js +4 -4
- package/dist/checks/plan.js.map +1 -1
- package/dist/checks/ready.d.ts +10 -0
- package/dist/checks/ready.d.ts.map +1 -0
- package/dist/checks/ready.js +22 -0
- package/dist/checks/ready.js.map +1 -0
- package/dist/cli.js +58 -6
- package/dist/cli.js.map +1 -1
- package/dist/explorer/index.d.ts.map +1 -1
- package/dist/explorer/index.js +34 -3
- package/dist/explorer/index.js.map +1 -1
- package/dist/explorer/queue.d.ts +10 -3
- package/dist/explorer/queue.d.ts.map +1 -1
- package/dist/explorer/queue.js +12 -11
- package/dist/explorer/queue.js.map +1 -1
- package/dist/explorer/screens.d.ts +23 -0
- package/dist/explorer/screens.d.ts.map +1 -0
- package/dist/explorer/screens.js +41 -0
- package/dist/explorer/screens.js.map +1 -0
- package/dist/inbox/http.d.ts +20 -0
- package/dist/inbox/http.d.ts.map +1 -0
- package/dist/inbox/http.js +119 -0
- package/dist/inbox/http.js.map +1 -0
- package/dist/inbox/load.d.ts +10 -0
- package/dist/inbox/load.d.ts.map +1 -0
- package/dist/inbox/load.js +33 -0
- package/dist/inbox/load.js.map +1 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/llm/index.d.ts.map +1 -1
- package/dist/llm/index.js +16 -13
- package/dist/llm/index.js.map +1 -1
- package/dist/llm/prices.d.ts +28 -4
- package/dist/llm/prices.d.ts.map +1 -1
- package/dist/llm/prices.js +39 -11
- package/dist/llm/prices.js.map +1 -1
- package/dist/llm/temperature.d.ts +20 -0
- package/dist/llm/temperature.d.ts.map +1 -0
- package/dist/llm/temperature.js +47 -0
- package/dist/llm/temperature.js.map +1 -0
- package/dist/monkey.d.ts +8 -1
- package/dist/monkey.d.ts.map +1 -1
- package/dist/monkey.js +71 -10
- package/dist/monkey.js.map +1 -1
- package/dist/outcome/check.d.ts +49 -0
- package/dist/outcome/check.d.ts.map +1 -0
- package/dist/outcome/check.js +293 -0
- package/dist/outcome/check.js.map +1 -0
- package/dist/outcome.d.ts +1 -0
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +76 -2
- package/dist/outcome.js.map +1 -1
- package/dist/planner/authNegative.d.ts.map +1 -1
- package/dist/planner/authNegative.js +12 -0
- package/dist/planner/authNegative.js.map +1 -1
- package/dist/planner/dedupe.d.ts.map +1 -1
- package/dist/planner/dedupe.js +6 -2
- package/dist/planner/dedupe.js.map +1 -1
- package/dist/planner/faults.js +1 -0
- package/dist/planner/faults.js.map +1 -1
- package/dist/planner/focus.js +2 -0
- package/dist/planner/focus.js.map +1 -1
- package/dist/planner/forms.d.ts.map +1 -1
- package/dist/planner/forms.js +14 -2
- package/dist/planner/forms.js.map +1 -1
- package/dist/planner/index.d.ts +5 -0
- package/dist/planner/index.d.ts.map +1 -1
- package/dist/planner/index.js +65 -14
- package/dist/planner/index.js.map +1 -1
- package/dist/planner/inventory.d.ts +6 -0
- package/dist/planner/inventory.d.ts.map +1 -1
- package/dist/planner/inventory.js +59 -0
- package/dist/planner/inventory.js.map +1 -1
- package/dist/planner/salvage.d.ts.map +1 -1
- package/dist/planner/salvage.js +9 -4
- package/dist/planner/salvage.js.map +1 -1
- package/dist/runner/actions.d.ts +2 -0
- package/dist/runner/actions.d.ts.map +1 -1
- package/dist/runner/actions.js +141 -6
- package/dist/runner/actions.js.map +1 -1
- package/dist/runner/authNegative.d.ts.map +1 -1
- package/dist/runner/authNegative.js +81 -21
- package/dist/runner/authNegative.js.map +1 -1
- package/dist/runner/evidence.d.ts +27 -6
- package/dist/runner/evidence.d.ts.map +1 -1
- package/dist/runner/evidence.js +86 -10
- package/dist/runner/evidence.js.map +1 -1
- package/dist/runner/flowStatus.d.ts +7 -2
- package/dist/runner/flowStatus.d.ts.map +1 -1
- package/dist/runner/flowStatus.js +12 -3
- package/dist/runner/flowStatus.js.map +1 -1
- package/dist/runner/http5xx.d.ts.map +1 -1
- package/dist/runner/http5xx.js +1 -0
- package/dist/runner/http5xx.js.map +1 -1
- package/dist/runner/index.d.ts +18 -1
- package/dist/runner/index.d.ts.map +1 -1
- package/dist/runner/index.js +276 -61
- package/dist/runner/index.js.map +1 -1
- package/dist/runner/locate.d.ts.map +1 -1
- package/dist/runner/locate.js +101 -11
- package/dist/runner/locate.js.map +1 -1
- package/dist/runner/replay.d.ts +6 -1
- package/dist/runner/replay.d.ts.map +1 -1
- package/dist/runner/replay.js +77 -2
- package/dist/runner/replay.js.map +1 -1
- package/dist/runner/sensitive.d.ts +53 -0
- package/dist/runner/sensitive.d.ts.map +1 -0
- package/dist/runner/sensitive.js +191 -0
- package/dist/runner/sensitive.js.map +1 -0
- package/dist/signup/detect.d.ts +62 -0
- package/dist/signup/detect.d.ts.map +1 -0
- package/dist/signup/detect.js +137 -0
- package/dist/signup/detect.js.map +1 -0
- package/dist/signup/guard.d.ts +21 -0
- package/dist/signup/guard.d.ts.map +1 -0
- package/dist/signup/guard.js +151 -0
- package/dist/signup/guard.js.map +1 -0
- package/dist/signup/ledger.d.ts +35 -0
- package/dist/signup/ledger.d.ts.map +1 -0
- package/dist/signup/ledger.js +72 -0
- package/dist/signup/ledger.js.map +1 -0
- package/dist/signup/plan.d.ts +21 -0
- package/dist/signup/plan.d.ts.map +1 -0
- package/dist/signup/plan.js +120 -0
- package/dist/signup/plan.js.map +1 -0
- package/dist/signup/run.d.ts +30 -0
- package/dist/signup/run.d.ts.map +1 -0
- package/dist/signup/run.js +414 -0
- package/dist/signup/run.js.map +1 -0
- package/dist/signup/submit.d.ts +13 -0
- package/dist/signup/submit.d.ts.map +1 -0
- package/dist/signup/submit.js +40 -0
- package/dist/signup/submit.js.map +1 -0
- package/dist/trace/httpIdentity.d.ts +17 -0
- package/dist/trace/httpIdentity.d.ts.map +1 -0
- package/dist/trace/httpIdentity.js +61 -0
- package/dist/trace/httpIdentity.js.map +1 -0
- package/dist/trace/serialize.d.ts.map +1 -1
- package/dist/trace/serialize.js +3 -0
- package/dist/trace/serialize.js.map +1 -1
- package/dist/trace/stepLabel.d.ts +11 -0
- package/dist/trace/stepLabel.d.ts.map +1 -0
- package/dist/trace/stepLabel.js +49 -0
- package/dist/trace/stepLabel.js.map +1 -0
- package/dist/triager/index.d.ts +5 -1
- package/dist/triager/index.d.ts.map +1 -1
- package/dist/triager/index.js +146 -15
- package/dist/triager/index.js.map +1 -1
- package/dist/types.d.ts +221 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,58 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.7.0-beta.4] — 2026-11-01
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- OpenAI, Anthropic, and Mistral calls omit `temperature` for models that reject it (`gpt-5*`, o-series). A 400 that says temperature is unsupported is retried once without the field. Other models still default to 0.2.
|
|
15
|
+
- A planner failure is visible. `TestPlan.plannerFallback` and `plannerFallbackReason` are set, and the process logs `planner fallback`. A model that correctly returns no journeys on a login wall is not a failure. The run stays `login_required`.
|
|
16
|
+
- Planning has its own budget. On a timed run the checks keep a reserve (45s of the 120s Quick pass, or 40% of a shorter budget). A planner that would eat that reserve is skipped and the grounded plan runs, so the checks are not starved.
|
|
17
|
+
- The crawler keeps the trailing slash on the URL it visits. Dedup still ignores the slash. `https://the-internet.herokuapp.com/add_remove_elements/` is no longer requested without the slash (that URL 404s).
|
|
18
|
+
- The crawl does not invent the origin root. A root 404 is reported only when the start URL is the root or a page links to it.
|
|
19
|
+
- An uncaught page error from a script on a different registrable domain (ads, analytics, tag managers) is a suggestion, not a major or critical bug, and it does not fail navigation. A first-party page error keeps its current severity.
|
|
20
|
+
- Missing autocomplete, a missing viewport or meta description, and horizontal overflow on a page with no viewport meta are suggestions. They are not bugs, not failures, and not part of the verdict. Serious accessibility failures (missing labels, contrast, and the rest of axe) stay bugs. A missing title stays a bug. Tiny tap targets stay bugs.
|
|
21
|
+
- The planner drops a journey that navigates to any URL the crawl did not see, including a URL on another host.
|
|
22
|
+
- `estimateCostUsd` prices each step at that step's model. `gpt-5-mini` and `gpt-5-nano` have price rows. `gpt-4.1-nano` is marked deprecated.
|
|
23
|
+
- Explorer model errors are on `SiteMap.warnings` and on the page (`SiteMapPage.warnings`), as well as in the server log. `RunResult.warnings` copies them, plus a line when the planner used the grounded fallback.
|
|
24
|
+
- axe-core findings roll up by rule id across pages into one bug with `affectedPages`. `color-contrast` and `scrollable-region-focusable` are minor at most. Other serious or critical rules stay bugs, also one per rule.
|
|
25
|
+
- The same HTTP failure (method + path + status) from two flows is one bug. `seenInFlows` lists the flows. Every step gets a `label`, taken from the action and target when the planner omits one.
|
|
26
|
+
- A configured inbox (`MonkeyConfig.inbox`, `run.inbox`, or `plan.signupInbox: true`) plans exactly one account sign-up for a detected sign-up form. The "do not create an account" instruction applies only when no inbox is configured. `exploreAndPlan` and `executeAndTriage` pass the flag through.
|
|
27
|
+
- A click aimed at `text:Search` prefers `getByRole(button | link | searchbox)`, then label, placeholder, and aria-label, and uses a stored CSS selector first. Hidden and duplicate matches are skipped. Text is the fallback. The recorded role is the element's role, so a link is not replayed as a button.
|
|
28
|
+
- Sign-up validation clicks the form's own submit (`type="submit"` or a create-account / sign-up / register label). It does not click the first button, and it does not click OAuth controls (`Use Facebook`, `Continue with`, `Sign in with`, and `/auth/<provider>`). A hidden honeypot is not filled. A fill that fails before submit is `signup_reason` `automation_error` with `signup_started: true`, not a site bug. No sign-up form reports `signup_reason` `no_signup_form`.
|
|
29
|
+
- Password-reset, OTP / magic-link / send-code, newsletter, checkout/payment, and account-deletion submits are blocked in the runner and at the network (the POST is aborted) unless the host allows them. An inbox allows OTP, reset, and the one sign-up. Empty validation still runs. `RunnerOptions.allowSensitive` names any extra kinds.
|
|
30
|
+
- Navigation to `/auth/<provider>` or a known OAuth host is aborted. The flow is inconclusive.
|
|
31
|
+
- Invented success copy is not a failing check. `text_visible` and `text_absent` misses are inconclusive. The planner is told to prefer a URL change, a form that leaves, a `role=alert` / `role=status` region, or the form request's HTTP status. A fill that leaves the field empty is an automation error. A confirm dialog is accepted only when the remaining steps ask for it.
|
|
32
|
+
- A page error with no script URL in the stack or the message is a suggestion (`unattributed-error`), not a major bug. When the message names a script, that script decides first-party vs third-party.
|
|
33
|
+
- Page checks run before sign-up and model flows, and each check records its own `durationMs`. A check skipped because the run is out of time has `outcome_reason` `budget_exhausted`, not a 0ms couldn't-confirm.
|
|
34
|
+
- Sign-in, sign-up, register, and password-reset URLs are public screens, not auth-gated. Two URLs that render the same title, heading, and fields (for example `/` and `/signin`) are one page.
|
|
35
|
+
- An input placeholder is not visible text. A placeholder of "Success" does not satisfy a text assertion.
|
|
36
|
+
- A wrong-password check passes when the page shows a sign-in error (including "correct login details", "not recognised", or an alert) or the auth request returns 400, 401, 403, or 422 and the URL stays on the login page. An empty field after the fill is an automation error, not a missing error message.
|
|
37
|
+
- A sign-in or sign-up URL counts as a public screen even if an older flag still says it is auth-gated. A sign-in form rendered at `/` is a public screen too.
|
|
38
|
+
- Page-check `durationMs` is the measured time. A check that finished in under a millisecond is 0.
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- `RunResult.suggestions` and `Suggestion` (`pageUrl`, `title`, `detail`, `kind`, `severity: 'info'`). Group by `pageUrl` for a per-page list. Omitted when empty.
|
|
43
|
+
- `BugReport.affectedPages` for a rolled-up axe rule, and `BugReport.seenInFlows` (`{ flowId, name }`) when more than one flow hit the same HTTP failure.
|
|
44
|
+
- `TestStep.label`, `StepResult.label`, and `TraceStep.label`.
|
|
45
|
+
- `SuggestionKind` `unattributed-error`. `SignupReason` `automation_error`. `OutcomeReason` `budget_exhausted`. `RunResult.signup_started` and `RunResult.pagesExplored`.
|
|
46
|
+
- `RunnerOptions.allowSensitive` (`signup`, `reset`, `otp`, `newsletter`, `payment`, `deletion`). An inbox already allows `signup`, `reset`, and `otp`.
|
|
47
|
+
- `scripts/bakeoff.ts --runs N`. Each row reports suggestions separately from real bugs, records `plannerFallback`, and prices tokens per step.
|
|
48
|
+
|
|
49
|
+
## [0.7.0-beta.3] — 2026-11-01
|
|
50
|
+
|
|
51
|
+
### Fixed
|
|
52
|
+
|
|
53
|
+
- A flow is no longer `passed` because its steps executed. Every kept flow has an `outcomeCheck`. The runner evaluates it after the last step. A missing check is `inconclusive` with `outcome_reason` `no_assertion`. A check that cannot be decided is `assertion_unverifiable`. Page checks, auth-negative checks, and sign-up validation already assert an observation; replay does the same, and a trace with no check is not a pass.
|
|
54
|
+
- The runner refuses to submit a completed sign-up or account-creation form (password plus confirm, create-account / sign-up / register, or a signup URL) unless the caller passed an `InboxProvider`. Without one, the engine runs validation only (empty, invalid email, password mismatch) and sets `signup_status` `not_tested` with `signup_reason` `no_inbox`. That refusal is a hard guard, not a prompt.
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
|
|
58
|
+
- `TestFlow.outcomeCheck` and `FlowResult.assertion`. `OutcomeReason` gains `no_assertion` and `assertion_unverifiable`.
|
|
59
|
+
- `InboxProvider` (`allocate` returns `{ address, expiresAt? }`, `waitFor` accepts `signal` and may return `text` / `html`, optional `release`). One sign-up per run, name "MonkeyTest QA", password only in memory, never phone or payment. `signup_attempted`, `signup_verified`, `signup_status`, and `signup_reason` are set from that attempt. Captcha, phone, payment, timeout, and `cap_reached` are not bugs.
|
|
60
|
+
- CLI `--inbox <module>` and `--inbox-http <url>` (`MONKEYTEST_INBOX_TOKEN`). `createHttpInbox` and `loadInboxProvider` are exported. There is no default host.
|
|
61
|
+
|
|
10
62
|
## [0.7.0-beta.2] — 2026-11-01
|
|
11
63
|
|
|
12
64
|
### Added
|
package/README.md
CHANGED
|
@@ -1,211 +1,231 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/public/banner-dark.svg" />
|
|
4
|
+
<img alt="monkeytester. Bugs your tests didn't think to look for. Point it at a URL. It finds the bugs, then proves you fixed them." src="docs/public/banner-light.svg" width="1280" />
|
|
5
|
+
</picture>
|
|
3
6
|
</p>
|
|
4
7
|
|
|
5
|
-
<h1 align="center">
|
|
8
|
+
<h1 align="center">Bugs your tests didn't think to look for.</h1>
|
|
6
9
|
|
|
7
10
|
<p align="center">
|
|
8
|
-
|
|
9
|
-
Open source. Playwright
|
|
11
|
+
Point it at a URL. It finds the bugs, then proves you fixed them.<br />
|
|
12
|
+
Open source. Playwright and your LLM. Node.js 20+.
|
|
10
13
|
</p>
|
|
11
14
|
|
|
12
15
|
<p align="center">
|
|
13
16
|
<a href="https://www.npmjs.com/package/@monkeytestai/monkeytester"><img src="https://img.shields.io/npm/v/@monkeytestai/monkeytester" alt="npm @monkeytestai/monkeytester" /></a>
|
|
14
|
-
<a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen" alt="Node 20+" /></a>
|
|
17
|
+
<a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen" alt="Node.js 20+" /></a>
|
|
15
18
|
<a href="https://docs.monkeytest.ai"><img src="https://img.shields.io/badge/docs-docs.monkeytest.ai-7c3aed" alt="Documentation" /></a>
|
|
16
19
|
<a href="https://github.com/monkeytestai/monkeytester/actions/workflows/ci.yml"><img src="https://github.com/monkeytestai/monkeytester/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
|
|
17
20
|
<a href="https://github.com/monkeytestai/monkeytester/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-64748b" alt="AGPL-3.0" /></a>
|
|
18
21
|
</p>
|
|
19
22
|
|
|
20
23
|
<p align="center">
|
|
21
|
-
<a href="https://docs.monkeytest.ai/
|
|
22
|
-
<a href="https://docs.monkeytest.ai/
|
|
23
|
-
<a href="https://docs.monkeytest.ai/
|
|
24
|
-
<a href="https://docs.monkeytest.ai/
|
|
25
|
-
<a href="https://docs.monkeytest.ai/reference/overview">API</a> ·
|
|
24
|
+
<a href="https://docs.monkeytest.ai/getting-started/quick-start">Quick start</a> ·
|
|
25
|
+
<a href="https://docs.monkeytest.ai/guides/how-is-this-different">How is this different?</a> ·
|
|
26
|
+
<a href="https://docs.monkeytest.ai/reference/cli">CLI</a> ·
|
|
27
|
+
<a href="https://docs.monkeytest.ai/guides/llm-providers">LLM providers</a> ·
|
|
26
28
|
<a href="https://monkeytest.ai">Cloud</a>
|
|
27
29
|
</p>
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
`@monkeytestai/monkeytester` is an AGPL-3.0 TypeScript engine. The CLI is `monkeytest`. npm `latest` is **0.6.1**. Pre-release builds, including the tree on `main`, publish under the **`next`** tag.
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
## Quick start
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Point it at a URL. It crawls a few pages, asks an LLM *"what would a real user try here?"*, runs those flows step by step, and writes a stable, versioned `plan.json` you can commit to git. Tomorrow, after you ship a fix, **`monkeytest rerun`** re-executes the *exact same* plan — no LLM cost for re-planning, no plan drift between runs — and **`monkeytest diff`** tells you what's new, what's fixed, what regressed.
|
|
35
|
+
### 1. npx
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
npx
|
|
39
|
-
# ...you ship a fix...
|
|
40
|
-
npx monkeytest rerun # re-runs the same plan, exit 1 if any blocking bug remains
|
|
41
|
-
npx monkeytest diff prev latest # 2 fixed, 0 new, 1 still broken, 0 regressed (net -2)
|
|
38
|
+
npx --yes @monkeytestai/monkeytester@latest --help
|
|
42
39
|
```
|
|
43
40
|
|
|
44
|
-
|
|
41
|
+
That prints the commands. It does not need an API key or a browser.
|
|
45
42
|
|
|
46
|
-
|
|
43
|
+
### 2. Install
|
|
47
44
|
|
|
48
|
-
```
|
|
49
|
-
|
|
45
|
+
```bash
|
|
46
|
+
npm install @monkeytestai/monkeytester
|
|
47
|
+
npx playwright install chromium
|
|
48
|
+
```
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
pnpm, yarn, and bun install the same package (`pnpm add`, `yarn add`, `bun add`). Playwright downloads its own Chromium. These docs match `main`. For that build:
|
|
52
51
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
});
|
|
57
|
-
savePlan(plan, { dir: '.monkeytest' });
|
|
58
|
-
saveRun(a, { dir: '.monkeytest' });
|
|
52
|
+
```bash
|
|
53
|
+
npm install @monkeytestai/monkeytester@next
|
|
54
|
+
```
|
|
59
55
|
|
|
60
|
-
|
|
61
|
-
const stored = loadPlan('.monkeytest');
|
|
62
|
-
const { run: b } = await monkey.runFromPlan(stored.plan, {
|
|
63
|
-
run: { screenshotsDir: '.monkeytest/shots' },
|
|
64
|
-
});
|
|
65
|
-
saveRun(b, { dir: '.monkeytest' });
|
|
56
|
+
### 3. First run
|
|
66
57
|
|
|
67
|
-
|
|
68
|
-
|
|
58
|
+
```bash
|
|
59
|
+
export OPENAI_API_KEY="sk-..."
|
|
60
|
+
npx monkeytest run https://example.com --depth basic
|
|
69
61
|
```
|
|
70
62
|
|
|
71
|
-
|
|
63
|
+
With an OpenAI key, the default model is `gpt-4o-mini`. If several keys are set, auto-detect uses the first of: `GEMINI_API_KEY` or `GOOGLE_API_KEY`, `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `MISTRAL_API_KEY`, `GROQ_API_KEY`, then `OPENAI_COMPATIBLE_BASE_URL`.
|
|
72
64
|
|
|
73
|
-
|
|
65
|
+
`--depth basic` is Quick pass: 6 pages, 5 LLM flows, page checks outside that budget, and a 120 second cap. About 10 cases, usually 1–2 minutes. `--max` and `--flows` override the page and flow caps.
|
|
74
66
|
|
|
75
|
-
|
|
67
|
+
### 4. Read the report
|
|
76
68
|
|
|
77
69
|
```bash
|
|
78
|
-
|
|
79
|
-
npx playwright install chromium
|
|
70
|
+
npx monkeytest report
|
|
80
71
|
```
|
|
81
72
|
|
|
82
|
-
|
|
73
|
+
| Path | What it is |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| `.monkeytest/plan.json` | The plan. `rerun` replays its trace. |
|
|
76
|
+
| `.monkeytest/runs/<id>.json` | The run: flows, bugs, outcome. |
|
|
77
|
+
| `.monkeytest/shots/` | Page and step PNGs, and one WebM per flow. |
|
|
78
|
+
|
|
79
|
+
Exit `0` when no blocking bug remains (`minor` does not fail the process). Exit `1` when `run` or `rerun` found a blocking bug, when `diff` found a new or more severe bug, or when `verify` still sees a bug firing. Exit `2` is bad arguments or no provider. Exit `3` is an engine error, including a crawl that opened no pages.
|
|
80
|
+
|
|
81
|
+
## Demo
|
|
82
|
+
|
|
83
|
+
> **Not a recording.** A capture of a real `monkeytest run` is not in this repository yet. When it is added, it will be a real run (for example against [bananabeings.com](https://bananabeings.com)). The figure below is a diagram of the loop.
|
|
84
|
+
|
|
85
|
+
<p align="center">
|
|
86
|
+
<img alt="Diagram: monkeytest run, you fix the site, monkeytest rerun replays the same trace, monkeytest diff reports what changed. Not a captured session." src="docs/public/loop.svg" width="720" />
|
|
87
|
+
</p>
|
|
88
|
+
|
|
89
|
+
## What you get
|
|
90
|
+
|
|
91
|
+
Page checks run without a model call. The five are console errors, same-site failed requests and broken links, axe-core WCAG A/AA, mobile overflow and tap targets at 375px, and title / description / lang / viewport / h1. Serious or critical axe violations are bugs. A flow is `passed` only when its outcome check verifies. No check is `inconclusive` with reason `no_assertion`. A check that cannot be decided is `assertion_unverifiable`.
|
|
92
|
+
|
|
93
|
+
The contributor smoke script stubs the LLM and crawls `https://example.com`. It does not call a provider. From a clone, after `npm run build` and `npx playwright install chromium`:
|
|
83
94
|
|
|
84
95
|
```bash
|
|
85
|
-
|
|
86
|
-
npx monkeytest run https://example.com --depth basic
|
|
96
|
+
node scripts/smoke.mjs
|
|
87
97
|
```
|
|
88
98
|
|
|
89
|
-
|
|
99
|
+
This is the output of `node scripts/smoke.mjs` on this repository after `npm run build`. The duration is from that run.
|
|
90
100
|
|
|
91
|
-
|
|
101
|
+
```text
|
|
102
|
+
· visited https://example.com/ — Static placeholder page used as the canonical example domain.
|
|
92
103
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
| `outcome_reason` | Short code such as `automation_error`, `all_flows_skipped`, `site_unreachable`, `login_required`. `login_required` is also set on `clean` and `bugs_found` when `public_screens` is `0` |
|
|
97
|
-
| `outcome_detail` | A sentence that matches the confirmed bug count, plus a next step. On a login-only site it says deeper journeys need an account |
|
|
98
|
-
| `public_screens` | Number of crawled pages that are not auth-gated. `0` is a login-only site |
|
|
99
|
-
| `engine_version` | Engine that produced the run, for example `0.7.0-beta.1` (`ENGINE_VERSION`) |
|
|
104
|
+
[explore] done in 1.1 s
|
|
105
|
+
pages: 1 failures: 0
|
|
106
|
+
siteType: placeholder
|
|
100
107
|
|
|
101
|
-
|
|
108
|
+
[plan] flows: 6
|
|
109
|
+
- [happy_path] Visit the example.com homepage (2 steps)
|
|
110
|
+
- [visual] Console errors on load (1 steps)
|
|
111
|
+
- [visual] Broken requests and links (1 steps)
|
|
112
|
+
- [accessibility] WCAG A and AA (1 steps)
|
|
113
|
+
- [visual] Mobile layout (1 steps)
|
|
114
|
+
- [accessibility] Page metadata (1 steps)
|
|
102
115
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
### From a clone (contributors)
|
|
116
|
+
OK — engine pipeline is wired correctly.
|
|
117
|
+
```
|
|
106
118
|
|
|
107
|
-
|
|
119
|
+
When one confirmed bug is filed, the engine's `outcome_detail` is this sentence (asserted by the outcome tests, not a sample report):
|
|
108
120
|
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
npm install && npm run build
|
|
112
|
-
npx playwright install chromium && node scripts/smoke.mjs
|
|
121
|
+
```text
|
|
122
|
+
Found 1 confirmed bug. Open the top one and confirm it on the site before treating this run as healthy.
|
|
113
123
|
```
|
|
114
124
|
|
|
115
|
-
|
|
125
|
+
On a login-only crawl (`public_screens` is `0`) the same case says deeper journeys need an account, and `outcome_reason` is `login_required`.
|
|
126
|
+
|
|
127
|
+
## How is this different?
|
|
128
|
+
|
|
129
|
+
| | Who chooses the cases | What comes back |
|
|
130
|
+
| --- | --- | --- |
|
|
131
|
+
| **monkeytester** | The engine, from the pages it crawled | A stored plan, an honest outcome, then `rerun` and `diff` |
|
|
132
|
+
| **[Playwright](https://playwright.dev/docs/intro)** | You do. Playwright Test is an end-to-end framework for the tests you write. | A report for those scripts |
|
|
133
|
+
| **[browser-use](https://github.com/browser-use/browser-use)** | You do. Its README describes an open-source browser agent that carries out a task you give it. | The result of that task |
|
|
134
|
+
| **Recorders and other scripted QA tools** | You do, by recording a session or writing the steps | A replay of those steps |
|
|
116
135
|
|
|
117
|
-
|
|
136
|
+
monkeytester decides what to try. A pass requires a verified outcome check, otherwise the result is `inconclusive`. `monkeytest rerun` replays the stored trace, and `monkeytest diff` compares fingerprints. More on the [comparison page](https://docs.monkeytest.ai/guides/how-is-this-different).
|
|
118
137
|
|
|
119
|
-
|
|
138
|
+
## Find, fix, rerun, diff
|
|
120
139
|
|
|
121
140
|
```bash
|
|
122
|
-
|
|
123
|
-
|
|
141
|
+
npx monkeytest run https://example.com --depth basic
|
|
142
|
+
# you ship a fix
|
|
143
|
+
npx monkeytest rerun
|
|
144
|
+
npx monkeytest diff prev latest
|
|
124
145
|
```
|
|
125
146
|
|
|
126
|
-
|
|
147
|
+
`rerun` replays the action trace and does not call the LLM. `--heal` may call the model when a stored locator misses. Runs saved before traces existed fall back to re-executing the plan with the LLM. `diff prev latest` compares the previous run to the newest one. The printer's line is `N new, N fixed, N still broken, N regressed (net ±N)`. It exits 1 when a bug is new or more severe.
|
|
127
148
|
|
|
128
|
-
|
|
129
|
-
- **Drop-in, not framework.** One library, one constructor. No DSL.
|
|
130
|
-
- **Bring your own LLM.** OpenAI, Gemini, Anthropic, Mistral, Groq, or any OpenAI-compatible endpoint (Ollama, vLLM, OpenRouter). Pick a different model **per phase**.
|
|
131
|
-
- **Real evidence.** Per-step screenshots, optional WebM video, console + network failures, and bug reports with stable fingerprints across runs.
|
|
132
|
-
- **Live activity stream.** Subscribe to a typed `EventBus` and pipe explorer / planner / runner / triager events into your own dashboard.
|
|
133
|
-
- **Resilient.** If the planner fails, you still get explorer screenshots. If a flow blows up, you still get the steps that ran. Nothing is all-or-nothing.
|
|
134
|
-
- **Hackable, typed, observable.** Pure TypeScript, zod-validated LLM output, structured `RunResult` you can serialise.
|
|
149
|
+
`monkeytest verify` replays each known bug and prints `fixed`, `still_broken`, `flaky`, `healed`, or `blocked`.
|
|
135
150
|
|
|
136
|
-
|
|
151
|
+
The same loop from the library:
|
|
137
152
|
|
|
138
153
|
```ts
|
|
139
|
-
import { Monkey,
|
|
140
|
-
|
|
141
|
-
const events = new EventBus();
|
|
142
|
-
events.on(e => console.log(`[${e.phase}] ${e.type}: ${e.message}`));
|
|
143
|
-
|
|
144
|
-
// Mix providers per phase: cheap explorer + smart planner + fast runner
|
|
145
|
-
const monkey = new Monkey({
|
|
146
|
-
llm: {
|
|
147
|
-
explorer: { provider: 'gemini', model: 'gemini-flash-lite-latest' },
|
|
148
|
-
planner: { provider: 'anthropic', model: 'claude-sonnet-4-5' },
|
|
149
|
-
runner: { provider: 'groq', model: 'llama-3.3-70b-versatile' },
|
|
150
|
-
},
|
|
151
|
-
});
|
|
154
|
+
import { Monkey, autoLLMConfig, savePlan, saveRun, loadPlan, diffRuns } from '@monkeytestai/monkeytester';
|
|
152
155
|
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
plan: { maxFlows: 6, includeAuthFlows: false },
|
|
157
|
-
run: { screenshotsDir: '.monkeytest/shots', headless: true, stepTimeoutMs: 20_000 },
|
|
156
|
+
const monkey = new Monkey({ llm: autoLLMConfig({ quality: 'balanced' }) });
|
|
157
|
+
const { plan, run: first } = await monkey.executeAndTriage('https://example.com', {
|
|
158
|
+
run: { screenshotsDir: '.monkeytest/shots' },
|
|
158
159
|
});
|
|
160
|
+
savePlan(plan, { dir: '.monkeytest' });
|
|
161
|
+
saveRun(first, { dir: '.monkeytest' });
|
|
159
162
|
|
|
160
|
-
|
|
161
|
-
|
|
163
|
+
const stored = loadPlan('.monkeytest');
|
|
164
|
+
const { run: second } = await monkey.runFromPlan(stored.plan, {
|
|
165
|
+
run: { screenshotsDir: '.monkeytest/shots' },
|
|
166
|
+
});
|
|
167
|
+
saveRun(second, { dir: '.monkeytest' });
|
|
168
|
+
console.log(diffRuns(first, second).stats);
|
|
169
|
+
```
|
|
162
170
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
171
|
+
## CI
|
|
172
|
+
|
|
173
|
+
`run` already exits 1 on a blocking bug, so the job fails without a wrapper. Pass your preview URL in. The step below does not wait on a host for you.
|
|
174
|
+
|
|
175
|
+
```yaml
|
|
176
|
+
name: monkeytest
|
|
177
|
+
on: [workflow_dispatch]
|
|
178
|
+
jobs:
|
|
179
|
+
monkeytest:
|
|
180
|
+
runs-on: ubuntu-latest
|
|
181
|
+
steps:
|
|
182
|
+
- uses: actions/setup-node@v4
|
|
183
|
+
with:
|
|
184
|
+
node-version: 20
|
|
185
|
+
- run: npm install @monkeytestai/monkeytester
|
|
186
|
+
- run: npx playwright install --with-deps chromium
|
|
187
|
+
- run: npx monkeytest run "$PREVIEW_URL" --depth basic
|
|
188
|
+
env:
|
|
189
|
+
PREVIEW_URL: https://example.com
|
|
190
|
+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
167
191
|
```
|
|
168
192
|
|
|
169
|
-
|
|
193
|
+
Upload `.monkeytest/shots/` and `.monkeytest/runs/` as artifacts when you want the evidence. The longer recipe is in the [CI guide](https://docs.monkeytest.ai/guides/ci).
|
|
170
194
|
|
|
171
|
-
|
|
172
|
-
- **PR previews** — run on Vercel/Netlify preview URLs in CI ([recipe](https://docs.monkeytest.ai/guide/ci)).
|
|
173
|
-
- **Daily smoke runs** against prod with cheap models.
|
|
174
|
-
- **Embedding in your own product** — the engine is a library, not a CLI.
|
|
195
|
+
## LLM providers
|
|
175
196
|
|
|
176
|
-
|
|
197
|
+
One provider per phase, or the same one everywhere. `autoLLMConfig({ quality: 'balanced' })` uses the cheap model for explore and run, and the smart model for the single planning call.
|
|
177
198
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
199
|
+
| Provider | Flag | Key | Cheap model | Smart model |
|
|
200
|
+
| --- | --- | --- | --- | --- |
|
|
201
|
+
| OpenAI | `openai` | `OPENAI_API_KEY` | `gpt-4o-mini` | `gpt-4o` |
|
|
202
|
+
| Gemini | `gemini` | `GEMINI_API_KEY` or `GOOGLE_API_KEY` | `gemini-flash-lite-latest` | `gemini-flash-latest` |
|
|
203
|
+
| Anthropic | `anthropic` | `ANTHROPIC_API_KEY` | `claude-haiku-4-5` | `claude-sonnet-4-5` |
|
|
204
|
+
| Mistral | `mistral` | `MISTRAL_API_KEY` | `mistral-small-latest` | `mistral-large-latest` |
|
|
205
|
+
| Groq | `groq` | `GROQ_API_KEY` | `llama-3.3-70b-versatile` | `llama-3.3-70b-versatile` |
|
|
206
|
+
| OpenAI-compatible | `openai_compatible` | `OPENAI_COMPATIBLE_BASE_URL` | `gpt-4o-mini` | `gpt-4o` |
|
|
181
207
|
|
|
182
|
-
|
|
208
|
+
Ollama, vLLM, LM Studio, and OpenRouter use `openai_compatible` and `--base-url`. Model ids are the defaults in `CHEAP_FAST_MODEL` and `SMART_MODEL`. Details, including a local Ollama command: [LLM providers](https://docs.monkeytest.ai/guides/llm-providers).
|
|
183
209
|
|
|
184
|
-
|
|
210
|
+
## Docs
|
|
185
211
|
|
|
186
|
-
|
|
187
|
-
- [Why monkeytest](https://docs.monkeytest.ai/guide/why-monkeytest) — how it compares with nearby tools
|
|
188
|
-
- [The bug-finding loop](https://docs.monkeytest.ai/guide/the-bug-finding-loop) — explore once, run repeatedly, diff
|
|
189
|
-
- [CLI reference](https://docs.monkeytest.ai/reference/cli) — every subcommand and flag
|
|
190
|
-
- [How it works](https://docs.monkeytest.ai/guide/architecture) — the four phases
|
|
191
|
-
- [LLM providers](https://docs.monkeytest.ai/guide/llm-providers) — model picks per provider
|
|
192
|
-
- [Cost & depth](https://docs.monkeytest.ai/guide/cost-and-depth) — what each run costs
|
|
193
|
-
- [Recipes](https://docs.monkeytest.ai/guide/recipes) — battle-tested patterns
|
|
194
|
-
- [Use in CI](https://docs.monkeytest.ai/guide/ci) — GitHub Actions setup
|
|
195
|
-
- [Troubleshooting](https://docs.monkeytest.ai/guide/troubleshooting) — common errors
|
|
212
|
+
[docs.monkeytest.ai](https://docs.monkeytest.ai)
|
|
196
213
|
|
|
197
|
-
|
|
214
|
+
- [Quick start](https://docs.monkeytest.ai/getting-started/quick-start)
|
|
215
|
+
- [Your first run](https://docs.monkeytest.ai/getting-started/first-run) and [reading the report](https://docs.monkeytest.ai/getting-started/reading-the-report)
|
|
216
|
+
- [How is this different?](https://docs.monkeytest.ai/guides/how-is-this-different)
|
|
217
|
+
- [Rerun and diff](https://docs.monkeytest.ai/guides/rerun-and-diff)
|
|
218
|
+
- [Auth and login-only sites](https://docs.monkeytest.ai/guides/auth)
|
|
219
|
+
- [Sign-up testing with your own inbox](https://docs.monkeytest.ai/guides/signup)
|
|
220
|
+
- [Cost and depth](https://docs.monkeytest.ai/guides/cost-and-depth)
|
|
221
|
+
- [CLI](https://docs.monkeytest.ai/reference/cli), [config](https://docs.monkeytest.ai/reference/config), [API](https://docs.monkeytest.ai/reference/api), [report fields](https://docs.monkeytest.ai/reference/report)
|
|
198
222
|
|
|
199
|
-
|
|
223
|
+
Hosted runs of the same engine: [monkeytest.ai](https://monkeytest.ai).
|
|
200
224
|
|
|
201
225
|
## Contributing
|
|
202
226
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
## Security
|
|
206
|
-
|
|
207
|
-
Report vulnerabilities privately — see [SECURITY.md](./SECURITY.md).
|
|
227
|
+
Issues and pull requests are welcome. Read [CONTRIBUTING.md](./CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md). Report vulnerabilities in private using [SECURITY.md](./SECURITY.md).
|
|
208
228
|
|
|
209
|
-
|
|
229
|
+
## License
|
|
210
230
|
|
|
211
|
-
|
|
231
|
+
[AGPL-3.0-only](./LICENSE). `SPDX-License-Identifier: AGPL-3.0-only`. You can run and self-host it. If you modify the engine and serve that modification as a network service, the Affero terms apply. Summary: [License](https://docs.monkeytest.ai/guides/license).
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recorded plans used to measure the beta.2 false-pass rate.
|
|
3
|
+
* The jewellery case is the one that filed a pass after typing an invented
|
|
4
|
+
* address into Create account. The other rows are the same shape for
|
|
5
|
+
* crawl, smoke, and the-internet-style forms. None of these are live calls.
|
|
6
|
+
*/
|
|
7
|
+
import type { FalsePassCase } from './falsePass.js';
|
|
8
|
+
export declare const FALSE_PASS_CASES: FalsePassCase[];
|
|
9
|
+
//# sourceMappingURL=cases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cases.d.ts","sourceRoot":"","sources":["../../src/audit/cases.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAYpD,eAAO,MAAM,gBAAgB,EAAE,aAAa,EAmJ3C,CAAC"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recorded plans used to measure the beta.2 false-pass rate.
|
|
3
|
+
* The jewellery case is the one that filed a pass after typing an invented
|
|
4
|
+
* address into Create account. The other rows are the same shape for
|
|
5
|
+
* crawl, smoke, and the-internet-style forms. None of these are live calls.
|
|
6
|
+
*/
|
|
7
|
+
function flow(partial) {
|
|
8
|
+
return {
|
|
9
|
+
description: partial.name,
|
|
10
|
+
kind: 'happy_path',
|
|
11
|
+
startUrl: 'https://shop.example/',
|
|
12
|
+
severityIfFails: 'major',
|
|
13
|
+
...partial,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export const FALSE_PASS_CASES = [
|
|
17
|
+
{
|
|
18
|
+
id: 'jewellery-create-account',
|
|
19
|
+
flowType: 'llm',
|
|
20
|
+
flow: flow({
|
|
21
|
+
id: 'create-a-new-account',
|
|
22
|
+
name: 'Create a New Account',
|
|
23
|
+
startUrl: 'https://jeweller.example/account/register',
|
|
24
|
+
steps: [
|
|
25
|
+
{ action: 'Fill the "Email" field with "qa@example.com"' },
|
|
26
|
+
{ action: 'Fill the "Password" field with "Test-password-1"' },
|
|
27
|
+
{ action: 'Fill the "Confirm password" field with "Test-password-1"' },
|
|
28
|
+
{ action: 'Click "Create account"' },
|
|
29
|
+
],
|
|
30
|
+
expectation: 'The account is created.',
|
|
31
|
+
}),
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: 'llm-contact-no-check',
|
|
35
|
+
flowType: 'llm',
|
|
36
|
+
flow: flow({
|
|
37
|
+
id: 'contact-us',
|
|
38
|
+
name: 'Contact us',
|
|
39
|
+
steps: [
|
|
40
|
+
{ action: 'Fill the "Email" field' },
|
|
41
|
+
{ action: 'Click "Send message"' },
|
|
42
|
+
],
|
|
43
|
+
expectation: 'The journey completes.',
|
|
44
|
+
}),
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 'crawl-public-form',
|
|
48
|
+
flowType: 'crawl',
|
|
49
|
+
flow: flow({
|
|
50
|
+
id: 'public-form-submit',
|
|
51
|
+
name: 'Submit the form on Contact',
|
|
52
|
+
startUrl: 'https://shop.example/contact',
|
|
53
|
+
steps: [
|
|
54
|
+
{ action: 'Fill the "Email" field', expectation: 'The Email field accepts a value.' },
|
|
55
|
+
{ action: 'Click "Send message"', expectation: 'The form submits and the site does not return a server error.' },
|
|
56
|
+
],
|
|
57
|
+
expectation: 'The public form submits without a server error.',
|
|
58
|
+
}),
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: 'crawl-fault-click',
|
|
62
|
+
flowType: 'crawl',
|
|
63
|
+
flow: flow({
|
|
64
|
+
id: 'fault-button-save-order',
|
|
65
|
+
name: 'Use Save order',
|
|
66
|
+
steps: [{ action: 'Click "Save order"', expectation: 'The "Save order" control runs without a page error.' }],
|
|
67
|
+
expectation: 'The "Save order" control runs without a page error.',
|
|
68
|
+
}),
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 'smoke-read-home',
|
|
72
|
+
flowType: 'smoke',
|
|
73
|
+
flow: flow({
|
|
74
|
+
id: 'read-home',
|
|
75
|
+
name: 'Read the homepage',
|
|
76
|
+
steps: [{ action: 'Read the introductory paragraph', expectation: 'The page loads.' }],
|
|
77
|
+
expectation: 'The homepage loads.',
|
|
78
|
+
}),
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: 'the-internet-login',
|
|
82
|
+
flowType: 'llm',
|
|
83
|
+
flow: flow({
|
|
84
|
+
id: 'the-internet-login',
|
|
85
|
+
name: 'Log in',
|
|
86
|
+
startUrl: 'https://the-internet.herokuapp.com/login',
|
|
87
|
+
steps: [
|
|
88
|
+
{ action: 'Fill the "Username" field with "tomsmith"' },
|
|
89
|
+
{ action: 'Fill the "Password" field' },
|
|
90
|
+
{ action: 'Click "Login"' },
|
|
91
|
+
],
|
|
92
|
+
expectation: 'The user is logged in.',
|
|
93
|
+
}),
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: 'the-internet-forgot-password',
|
|
97
|
+
flowType: 'llm',
|
|
98
|
+
flow: flow({
|
|
99
|
+
id: 'the-internet-forgot',
|
|
100
|
+
name: 'Retrieve password',
|
|
101
|
+
startUrl: 'https://the-internet.herokuapp.com/forgot_password',
|
|
102
|
+
steps: [
|
|
103
|
+
{ action: 'Fill the "E-mail" field with "qa@example.com"' },
|
|
104
|
+
{ action: 'Click "Retrieve password"' },
|
|
105
|
+
],
|
|
106
|
+
expectation: 'The form submits.',
|
|
107
|
+
}),
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: 'auth-neg-empty',
|
|
111
|
+
flowType: 'auth-neg',
|
|
112
|
+
flow: flow({
|
|
113
|
+
id: 'auth-neg-empty-submit',
|
|
114
|
+
name: 'Submit the sign-in form empty',
|
|
115
|
+
kind: 'edge_case',
|
|
116
|
+
steps: [{
|
|
117
|
+
action: 'Click "Sign in" without filling the form',
|
|
118
|
+
expectation: 'The page shows a validation message.',
|
|
119
|
+
check: 'empty_submit',
|
|
120
|
+
}],
|
|
121
|
+
expectation: 'Empty submit shows validation.',
|
|
122
|
+
}),
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: 'check-console',
|
|
126
|
+
flowType: 'page-check',
|
|
127
|
+
flow: flow({
|
|
128
|
+
id: 'check-console',
|
|
129
|
+
name: 'Console errors on load',
|
|
130
|
+
kind: 'visual',
|
|
131
|
+
steps: [{ action: 'Check console errors on https://shop.example/', pageCheck: 'console', url: 'https://shop.example/' }],
|
|
132
|
+
expectation: 'The page loads without a first-party console error.',
|
|
133
|
+
}),
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: 'signup-val-empty',
|
|
137
|
+
flowType: 'signup',
|
|
138
|
+
flow: flow({
|
|
139
|
+
id: 'signup-val-empty',
|
|
140
|
+
name: 'Submit the sign-up form empty',
|
|
141
|
+
kind: 'edge_case',
|
|
142
|
+
startUrl: 'https://jeweller.example/account/register',
|
|
143
|
+
steps: [{
|
|
144
|
+
action: 'Click "Create account" without filling the sign-up form',
|
|
145
|
+
signupCheck: 'empty_submit',
|
|
146
|
+
}],
|
|
147
|
+
expectation: 'Empty submit shows validation and does not create an account.',
|
|
148
|
+
}),
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
id: 'rerun-no-check',
|
|
152
|
+
flowType: 'replay',
|
|
153
|
+
flow: flow({
|
|
154
|
+
id: 'replay-create-account',
|
|
155
|
+
name: 'Replay create account',
|
|
156
|
+
steps: [
|
|
157
|
+
{ action: 'Fill the "Email" field with "qa@example.com"' },
|
|
158
|
+
{ action: 'Click "Create account"' },
|
|
159
|
+
],
|
|
160
|
+
expectation: 'The account is created.',
|
|
161
|
+
}),
|
|
162
|
+
},
|
|
163
|
+
];
|
|
164
|
+
//# sourceMappingURL=cases.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cases.js","sourceRoot":"","sources":["../../src/audit/cases.ts"],"names":[],"mappings":"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"}
|