assuremind 1.2.1 → 1.3.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.
- package/README.md +133 -9
- package/dist/cli/index.js +999 -17105
- package/dist/index.d.mts +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +56 -1709
- package/dist/index.mjs +56 -1606
- package/docs/CLI-REFERENCE.md +19 -3
- package/docs/GETTING-STARTED.md +42 -1
- package/docs/STUDIO.md +205 -3
- package/package.json +9 -5
- package/templates/ASSUREMIND.md +7 -0
- package/templates/docs/GETTING-STARTED.md +13 -0
- package/templates/docs/STUDIO.md +11 -1
- package/ui/dist/assets/index-Bkr40QZS.js +942 -0
- package/ui/dist/assets/index-Bz5b82ao.css +1 -0
- package/ui/dist/index.html +2 -2
- package/dist/cli/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/ui/dist/assets/index-DTtYd1hD.js +0 -837
- package/ui/dist/assets/index-lOAh29q9.css +0 -1
package/README.md
CHANGED
|
@@ -23,10 +23,13 @@ Describe tests in plain English. AI generates Playwright code. Run anywhere.
|
|
|
23
23
|
| **Device emulation** | iPhone, Pixel, iPad, Galaxy — full Playwright device descriptors from UI or `--device` CLI flag |
|
|
24
24
|
| **Studio UI** | Browser-based editor, run dashboard, reports, healing review, git control center — with dark mode |
|
|
25
25
|
| **RAG memory** | AI learns from every run — retrieves similar past steps & healing fixes for smarter generation |
|
|
26
|
-
| **Test Recorder** | Record tests by clicking in a real browser — locators verified against Playwright's accessibility tree, zero AI cost |
|
|
26
|
+
| **Test Recorder** | Record tests by clicking in a real browser — locators verified against Playwright's accessibility tree, zero AI cost. Recorder + AI both handle iframes (click & fill), Shadow DOM, JS alerts, and keyboard actions |
|
|
27
27
|
| **Cost-optimised** | Template engine + code cache + RAG handle ~80% of steps with zero AI calls |
|
|
28
28
|
| **CI-ready** | `npx assuremind run --all --ci` — exit code 0/1, works with any pipeline |
|
|
29
29
|
| **File-based** | Plain JSON storage, fully Git-friendly, no database |
|
|
30
|
+
| **Faker Data** | 100+ @faker-js/faker generators across 16 categories — random emails, names, addresses, sequences — no code, no stale data |
|
|
31
|
+
| **Visual regression** | Pixel-diff screenshot comparison with baselines — approve/reject visual changes in Studio |
|
|
32
|
+
| **CI/CD integration** | Quality gates, PR comments (GitHub/GitLab), Slack/Teams notifications |
|
|
30
33
|
|
|
31
34
|
---
|
|
32
35
|
|
|
@@ -38,7 +41,17 @@ npx assuremind init # folders, config, Playwright browsers
|
|
|
38
41
|
npx assuremind studio # opens http://localhost:4400
|
|
39
42
|
```
|
|
40
43
|
|
|
41
|
-
|
|
44
|
+
### System Requirements
|
|
45
|
+
|
|
46
|
+
| | Minimum | Recommended |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| **Node.js** | 18 LTS | 20 LTS or newer |
|
|
49
|
+
| **OS** | macOS / Linux / Windows 10+ | — |
|
|
50
|
+
| **RAM** | 4 GB | 8 GB+ |
|
|
51
|
+
| **Disk** | ~2 GB (app + Playwright browsers) | 5 GB+ |
|
|
52
|
+
| **Java** | — | JDK 17+ — only for Allure HTML reports ([adoptium.net](https://adoptium.net)) |
|
|
53
|
+
|
|
54
|
+
`npx assuremind init` installs the Playwright browsers. Using a **cloud AI provider** (Anthropic, OpenAI, Gemini, …) needs only an API key and the specs above. Running a **local model via Ollama** has heavier requirements — see below.
|
|
42
55
|
|
|
43
56
|
### Configure AI Provider
|
|
44
57
|
|
|
@@ -53,6 +66,45 @@ ANTHROPIC_MODEL=claude-sonnet.. OPENAI_MODEL=gpt-4o GOOGLE_MODEL=
|
|
|
53
66
|
|
|
54
67
|
See `.env.example` for all 12 providers including Gemini, OpenAI, Anthropic, Ollama (local/free), etc.
|
|
55
68
|
|
|
69
|
+
### Local & Free — Ollama
|
|
70
|
+
|
|
71
|
+
Run models entirely on your own machine (no API key, no cost). AssureMind uses the model to turn
|
|
72
|
+
plain-English steps into Playwright code, so a **code-tuned model with strong instruction-following**
|
|
73
|
+
works best.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# 1. Install Ollama → https://ollama.com/download
|
|
77
|
+
ollama serve # starts the server on http://localhost:11434
|
|
78
|
+
ollama pull qwen2.5-coder:7b # 2. pull the recommended model
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# 3. .env
|
|
83
|
+
AI_PROVIDER=ollama
|
|
84
|
+
OLLAMA_MODEL=qwen2.5-coder:7b
|
|
85
|
+
OLLAMA_BASE_URL=http://localhost:11434
|
|
86
|
+
AI_TIMEOUT=120 # local inference is slower than cloud APIs
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Recommended models (by hardware):**
|
|
90
|
+
|
|
91
|
+
| Hardware | Model | Notes |
|
|
92
|
+
|----------|-------|-------|
|
|
93
|
+
| 16 GB+ RAM, GPU 8 GB+ VRAM | `qwen2.5-coder:14b` | Highest accuracy — best for complex steps / iframes |
|
|
94
|
+
| 16 GB RAM (GPU optional) ⭐ | `qwen2.5-coder:7b` | **Best balance** of quality & speed for this task |
|
|
95
|
+
| 8 GB RAM, no GPU | `llama3.2` (3B) / `qwen2.5-coder:3b` | Usable; good for simpler steps |
|
|
96
|
+
| ≤4–6 GB RAM | `llama3.2:1b` / `phi3:mini` | Lightweight; navigation & clicks only |
|
|
97
|
+
|
|
98
|
+
**Ollama system requirements:**
|
|
99
|
+
|
|
100
|
+
- **RAM is the floor** — a model needs roughly its file size **+ ≈2 GB free**. A 7B model (≈4.7 GB)
|
|
101
|
+
wants **8 GB free RAM minimum, 16 GB comfortable**; a 14B model wants **≈16 GB+**.
|
|
102
|
+
- **GPU is optional but transformative** — CPU-only works (hence `AI_TIMEOUT=120`), but a GPU with
|
|
103
|
+
**8 GB+ VRAM** (NVIDIA CUDA / Apple Silicon / modern AMD) makes 7B models fast. Apple Silicon (M-series) is excellent thanks to unified memory.
|
|
104
|
+
- **Disk** — a few GB per model; keep **10–20 GB free** if trying several.
|
|
105
|
+
- **Tips** — enable **MCP** (Settings → live page snapshots) for far more accurate locators with local
|
|
106
|
+
models. Avoid `deepseek-r1` here: its `<think>` reasoning output is slow and pollutes generated code.
|
|
107
|
+
|
|
56
108
|
---
|
|
57
109
|
|
|
58
110
|
## CLI
|
|
@@ -88,7 +140,7 @@ Full reference → [docs/CLI-REFERENCE.md](docs/CLI-REFERENCE.md)
|
|
|
88
140
|
|
|
89
141
|
Start with `npx assuremind studio` — opens at `http://localhost:4400`.
|
|
90
142
|
|
|
91
|
-
**Dashboard** · **Smart Tests** · **Test Editor** · **Run Config** · **Reports** · **Variables** · **Self-Healing** · **Step Library** · **Git Control** · **Settings** · **Docs**
|
|
143
|
+
**Dashboard** · **Smart Tests** · **Test Editor** · **Run Config** · **Reports** · **Variables** · **Self-Healing** · **Step Library** · **Faker Data** · **CI/CD** · **Git Control** · **Settings** · **Docs**
|
|
92
144
|
|
|
93
145
|
Full walkthrough → [docs/STUDIO.md](docs/STUDIO.md)
|
|
94
146
|
|
|
@@ -118,12 +170,17 @@ Click **Record** in the Test Editor, perform your actions, and stop. Each intera
|
|
|
118
170
|
|
|
119
171
|
### How it works
|
|
120
172
|
|
|
173
|
+
> Available for **UI** and **Audit** suites only (not API suites).
|
|
174
|
+
|
|
121
175
|
1. A headed Chromium browser opens your app's URL
|
|
122
|
-
2. Every click, fill, and
|
|
176
|
+
2. Every click, fill, navigation, and keyboard action is captured in real time — **including inside iframes and shadow roots**
|
|
123
177
|
3. Locators are resolved against Playwright's **accessibility tree** — the recorder tries 6 strategies (data-testid, getByRole, getByLabel, getByPlaceholder, getByText, CSS) and verifies each with `count() === 1`
|
|
124
178
|
4. **Iframe-aware** — elements inside iframes automatically generate `page.frameLocator('#iframe').getByRole(...)` code with the correct frame chain
|
|
125
|
-
5.
|
|
126
|
-
6.
|
|
179
|
+
5. **Shadow DOM** — `composedPath()[0]` pierces shadow roots; generates `host >> inner` pierce locators automatically
|
|
180
|
+
6. **JS dialogs** — alerts/confirms are auto-accepted during recording; `page.once('dialog', ...)` is prepended to the triggering step's code
|
|
181
|
+
7. **Keyboard** — Tab, Shift+Tab, arrows, Enter, Escape, Ctrl+A, and Space on buttons are all captured
|
|
182
|
+
8. Assertions via keyboard shortcuts: **Shift+Click** (element visible), **Ctrl+Shift+U** (URL), **Ctrl+Shift+T** (page title)
|
|
183
|
+
9. On stop, each action is added as a step with **pre-generated Playwright code** — no AI call needed
|
|
127
184
|
|
|
128
185
|
### What makes it stand out vs other recorders
|
|
129
186
|
|
|
@@ -131,7 +188,10 @@ Click **Record** in the Test Editor, perform your actions, and stop. Each intera
|
|
|
131
188
|
|---------|-------------|-------------------|---------------------|
|
|
132
189
|
| Locator quality | CSS/XPath | Good | Best — 6 strategies, verified against live page |
|
|
133
190
|
| Accessibility tree | No | Partial | Full — every locator checked via Playwright API |
|
|
134
|
-
| **Iframe support** | Partial | Manual | **
|
|
191
|
+
| **Iframe support** | Partial | Manual | **Full** — detects iframes, generates `frameLocator()` code — click **and** fill both work |
|
|
192
|
+
| **Shadow DOM** | No | Limited | `>>` pierce combinator — elements inside shadow roots are reachable |
|
|
193
|
+
| **JS Alert handling** | No | No | `page.once('dialog', ...)` registered automatically before triggering action |
|
|
194
|
+
| **Keyboard actions** | No | No | `page.keyboard.press()` / `.type()` for keys, shortcuts, and character input |
|
|
135
195
|
| Assertions | Manual | Manual | Shift+Click (hard), Ctrl+Shift+Click (soft), URL & title shortcuts |
|
|
136
196
|
| Plain-English steps | No | No | Yes — human-readable instructions auto-generated |
|
|
137
197
|
| Self-healing after | No | No | Yes — 5-level AI healing cascade |
|
|
@@ -149,7 +209,10 @@ Click **Record** in the Test Editor, perform your actions, and stop. Each intera
|
|
|
149
209
|
| Assertions are hard to write | Shift+Click for hard, Ctrl+Shift+Click for soft, Ctrl+Shift+U for URL, Ctrl+Shift+T for title |
|
|
150
210
|
| Hard vs soft assertions | Soft assertions (`expect.soft()`) let the test continue — all failures reported at end |
|
|
151
211
|
| Recorded tests are fragile | 6-strategy locator resolution + post-run 5-level self-healing |
|
|
152
|
-
| Apps use iframes (SAP, Salesforce) |
|
|
212
|
+
| Apps use iframes (SAP, Salesforce) | Recorder auto-detects iframe context, generates `frameLocator()` chains — **click and fill** both work |
|
|
213
|
+
| Shadow DOM / Web Components | Recorder pierces shadow roots via `composedPath()`, generates `>>` locators automatically |
|
|
214
|
+
| JavaScript alerts & popups | Recorder auto-accepts dialogs; `page.once('dialog', ...)` prepended to triggering step |
|
|
215
|
+
| Keyboard interactions | Recorder captures Tab, Shift+Tab, arrows, Ctrl+A, Enter, Escape, and Space |
|
|
153
216
|
|
|
154
217
|
---
|
|
155
218
|
|
|
@@ -243,6 +306,66 @@ Exit code `0` = all passed · `1` = failures.
|
|
|
243
306
|
|
|
244
307
|
---
|
|
245
308
|
|
|
309
|
+
## Enterprise Features
|
|
310
|
+
|
|
311
|
+
### Faker Data
|
|
312
|
+
|
|
313
|
+
100+ @faker-js/faker generators across 16 categories — generate realistic random data without code.
|
|
314
|
+
|
|
315
|
+
| Generator | Example output |
|
|
316
|
+
|-----------|---------------|
|
|
317
|
+
| `person.fullName` | Sarah Johnson |
|
|
318
|
+
| `internet.email` | sarah.johnson@gmail.com |
|
|
319
|
+
| `phone.number` | +1-555-123-4567 |
|
|
320
|
+
| `finance.amount` | 249.99 |
|
|
321
|
+
| `location.city` | San Francisco |
|
|
322
|
+
| Sequence `USER-{n}` | USER-001, USER-002, USER-003 |
|
|
323
|
+
|
|
324
|
+
Browse by category or search, select multiple tokens at once — selected tokens appear as removable chips, and clicking "Insert N tokens" inserts them all comma-separated (e.g. `{{FAKE_PERSON_FIRSTNAME}}, {{FAKE_PERSON_LASTNAME}}, {{FAKE_INTERNET_EMAIL}}`). Great for form filling. Tokens resolve to fresh random values on every test run — no more "email already exists" failures.
|
|
325
|
+
|
|
326
|
+
### Visual Regression
|
|
327
|
+
|
|
328
|
+
Pixel-perfect screenshot comparison — catch UI changes that functional tests miss. Configure in **Settings** → Visual Regression. Review diffs in **Reports** → Visual Diffs tab.
|
|
329
|
+
|
|
330
|
+
1. Enable in **Settings** → Visual Regression, then toggle the **Eye icon** on any step in the Test Editor
|
|
331
|
+
2. First run captures **baseline** screenshots (committed to git)
|
|
332
|
+
3. Subsequent runs **compare** pixel-by-pixel using `pixelmatch`
|
|
333
|
+
4. Diff > threshold → step **fails** with highlighted diff image
|
|
334
|
+
5. Review in **Reports** → Visual Diffs → **Approve** (update baseline) or **Reject** (it's a bug)
|
|
335
|
+
|
|
336
|
+
```
|
|
337
|
+
baselines/ # committed to git
|
|
338
|
+
├── login-suite/login-test/
|
|
339
|
+
│ ├── step-3-chromium-1920x1080.png
|
|
340
|
+
│ └── step-3-firefox-1920x1080.png
|
|
341
|
+
results/visual-diffs/{runId}/ # gitignored, per-run
|
|
342
|
+
├── step-3-baseline.png
|
|
343
|
+
├── step-3-actual.png
|
|
344
|
+
└── step-3-diff.png # red highlights
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
### CI/CD Integration
|
|
348
|
+
|
|
349
|
+
Quality gates, PR comments, and notifications — configured from Studio, executed in pipelines.
|
|
350
|
+
|
|
351
|
+
| Feature | What it does |
|
|
352
|
+
|---------|-------------|
|
|
353
|
+
| **Quality gates** | Set min pass rate (95%), max duration, required tags — pipeline fails if gate fails |
|
|
354
|
+
| **PR comments** | Auto-post test results as GitHub PR comment or GitLab MR note |
|
|
355
|
+
| **Notifications** | Slack, Teams, Email, custom webhook — trigger on failure, every run, or healing events |
|
|
356
|
+
|
|
357
|
+
```yaml
|
|
358
|
+
# GitHub Actions — full integration
|
|
359
|
+
- name: Run tests
|
|
360
|
+
env:
|
|
361
|
+
AI_PROVIDER: anthropic
|
|
362
|
+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
363
|
+
run: npx assuremind run --all --ci
|
|
364
|
+
# Quality gate auto-evaluates, PR comment auto-posts, Slack notifies on failure
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
246
369
|
## Documentation
|
|
247
370
|
|
|
248
371
|
| Resource | Location |
|
|
@@ -253,6 +376,7 @@ Exit code `0` = all passed · `1` = failures.
|
|
|
253
376
|
| Contributing | [CONTRIBUTING.md](CONTRIBUTING.md) |
|
|
254
377
|
| All AI providers | `.env.example` |
|
|
255
378
|
| Built-in docs | Studio → **Docs** page |
|
|
379
|
+
| Enterprise features | Studio → **Faker Data**, **CI/CD** pages; Visual Regression in **Settings** + **Reports** |
|
|
256
380
|
|
|
257
381
|
---
|
|
258
382
|
|
|
@@ -262,4 +386,4 @@ MIT — see [LICENSE](LICENSE) for details.
|
|
|
262
386
|
|
|
263
387
|
---
|
|
264
388
|
|
|
265
|
-
*Built by
|
|
389
|
+
*Built by [Deepak Hiremath](https://www.linkedin.com/in/deepak-hiremath-0017937a/)*
|