assuremind 1.1.1 → 1.2.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/CONTRIBUTING.md +13 -5
- package/README.md +89 -1
- package/dist/cli/index.js +2060 -415
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.mts +151 -12
- package/dist/index.d.ts +151 -12
- package/dist/index.js +49 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +49 -2
- package/dist/index.mjs.map +1 -1
- package/docs/CLI-REFERENCE.md +104 -0
- package/docs/GETTING-STARTED.md +64 -3
- package/docs/STUDIO.md +186 -0
- package/package.json +1 -1
- package/templates/env.example +2 -2
- package/templates/env.minimal +1 -1
- package/ui/dist/assets/index-DTtYd1hD.js +837 -0
- package/ui/dist/assets/index-lOAh29q9.css +1 -0
- package/ui/dist/assuremind-logo.png +0 -0
- package/ui/dist/favicon.svg +8 -36
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-By2Hw5l2.css +0 -1
- package/ui/dist/assets/index-DaQ-JHje.js +0 -819
package/CONTRIBUTING.md
CHANGED
|
@@ -36,9 +36,10 @@ cd ui && npm install && cd ..
|
|
|
36
36
|
assuremind/
|
|
37
37
|
├── src/
|
|
38
38
|
│ ├── cli/ # CLI entry point and commands (init, run, generate, …)
|
|
39
|
-
│ ├── engine/ # Test runner, executor, self-healing, Allure reporter
|
|
39
|
+
│ ├── engine/ # Test runner, executor, self-healing, Allure reporter, recorder
|
|
40
40
|
│ ├── ai/ # Smart router, provider adapters, prompts, code cache
|
|
41
41
|
│ ├── mcp/ # Playwright MCP integration (accessibility snapshots, action mapper)
|
|
42
|
+
│ ├── rag/ # RAG memory — TF-IDF embedder, vector store, code/healing/error corpora
|
|
42
43
|
│ ├── storage/ # File-based JSON stores (suites, cases, results, healing)
|
|
43
44
|
│ ├── server/ # Fastify API server + WebSocket
|
|
44
45
|
│ ├── types/ # Zod schemas and TypeScript types
|
|
@@ -226,7 +227,12 @@ Everything is stored as plain JSON files in the user's project directory — no
|
|
|
226
227
|
│ ├── videos/
|
|
227
228
|
│ ├── traces/
|
|
228
229
|
│ ├── reports/
|
|
229
|
-
│
|
|
230
|
+
│ ├── healing/
|
|
231
|
+
│ └── .rag/ # RAG semantic memory (auto-generated)
|
|
232
|
+
│ ├── idf-vocab.json
|
|
233
|
+
│ ├── code-corpus.json
|
|
234
|
+
│ ├── healing-corpus.json
|
|
235
|
+
│ └── error-catalog.json
|
|
230
236
|
└── autotest.config.json # written by writeConfig()
|
|
231
237
|
```
|
|
232
238
|
|
|
@@ -250,6 +256,8 @@ Healed steps are saved as `pending` events in `results/healing/pending.json` for
|
|
|
250
256
|
|
|
251
257
|
1. **Template engine** — recognises common patterns (navigate, click, fill, etc.) and uses zero-cost templates.
|
|
252
258
|
2. **Code cache** — SHA-based cache keyed on `(normalised instruction, url pattern)`. Cache persists to `results/code-cache.json`.
|
|
253
|
-
3. **
|
|
254
|
-
4. **
|
|
255
|
-
5. **
|
|
259
|
+
3. **RAG memory** — semantic retrieval from past runs. Code Corpus matches >= 0.90 are used directly as fuzzy cache hits ($0). Lower matches (0.65-0.90) enrich the AI prompt. Healing Corpus injects proven past fixes into self-healing prompts. Error Catalog warns the AI about known-bad patterns.
|
|
260
|
+
4. **MCP enrichment** — when enabled, the SmartRouter takes a live accessibility snapshot and feeds real page elements to the AI, boosting selector accuracy to ~90-95%.
|
|
261
|
+
5. **Complexity classifier** — routes simple steps to cheap/fast models (tiered mode) and complex steps to capable models.
|
|
262
|
+
6. **Batch generation** — multiple empty steps sent in one API call.
|
|
263
|
+
7. **Test Recorder** — deterministic code from browser interactions, zero AI calls. Uses Playwright's accessibility tree to resolve locators with 6 strategies, verified with `count() === 1`.
|
package/README.md
CHANGED
|
@@ -22,7 +22,9 @@ Describe tests in plain English. AI generates Playwright code. Run anywhere.
|
|
|
22
22
|
| **12 AI providers** | Anthropic · OpenAI · Gemini · Groq · DeepSeek · Together · Qwen · Perplexity · Ollama · Bedrock · Azure OpenAI · Custom |
|
|
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 |
|
|
27
|
+
| **Cost-optimised** | Template engine + code cache + RAG handle ~80% of steps with zero AI calls |
|
|
26
28
|
| **CI-ready** | `npx assuremind run --all --ci` — exit code 0/1, works with any pipeline |
|
|
27
29
|
| **File-based** | Plain JSON storage, fully Git-friendly, no database |
|
|
28
30
|
|
|
@@ -108,6 +110,92 @@ AI sees **real page elements** during code generation via the official `@playwri
|
|
|
108
110
|
|
|
109
111
|
---
|
|
110
112
|
|
|
113
|
+
## Test Recorder
|
|
114
|
+
|
|
115
|
+
Record tests by interacting with your application in a real browser — **zero AI, zero cost, zero guesswork**.
|
|
116
|
+
|
|
117
|
+
Click **Record** in the Test Editor, perform your actions, and stop. Each interaction becomes a step with verified Playwright code, ready to run.
|
|
118
|
+
|
|
119
|
+
### How it works
|
|
120
|
+
|
|
121
|
+
1. A headed Chromium browser opens your app's URL
|
|
122
|
+
2. Every click, fill, and navigation is captured in real time — **including inside iframes**
|
|
123
|
+
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
|
+
4. **Iframe-aware** — elements inside iframes automatically generate `page.frameLocator('#iframe').getByRole(...)` code with the correct frame chain
|
|
125
|
+
5. Assertions via keyboard shortcuts: **Shift+Click** (element visible), **Ctrl+Shift+U** (URL), **Ctrl+Shift+T** (page title)
|
|
126
|
+
6. On stop, each action is added as a step with **pre-generated Playwright code** — no AI call needed
|
|
127
|
+
|
|
128
|
+
### What makes it stand out vs other recorders
|
|
129
|
+
|
|
130
|
+
| Feature | Selenium IDE | Playwright Codegen | Assuremind Recorder |
|
|
131
|
+
|---------|-------------|-------------------|---------------------|
|
|
132
|
+
| Locator quality | CSS/XPath | Good | Best — 6 strategies, verified against live page |
|
|
133
|
+
| Accessibility tree | No | Partial | Full — every locator checked via Playwright API |
|
|
134
|
+
| **Iframe support** | Partial | Manual | **Auto** — detects iframes, generates `frameLocator()` code |
|
|
135
|
+
| Assertions | Manual | Manual | Shift+Click (hard), Ctrl+Shift+Click (soft), URL & title shortcuts |
|
|
136
|
+
| Plain-English steps | No | No | Yes — human-readable instructions auto-generated |
|
|
137
|
+
| Self-healing after | No | No | Yes — 5-level AI healing cascade |
|
|
138
|
+
| RAG memory | No | No | Yes — recorded steps feed the learning loop |
|
|
139
|
+
| Cost | Free | Free | Free |
|
|
140
|
+
|
|
141
|
+
### Biggest pain points in test automation — solved
|
|
142
|
+
|
|
143
|
+
| Pain Point | How the Recorder Solves It |
|
|
144
|
+
|-----------|---------------------------|
|
|
145
|
+
| Writing tests is slow | Record a full test in 30 seconds |
|
|
146
|
+
| Selectors break constantly | Locators verified against Playwright's accessibility tree in real time |
|
|
147
|
+
| AI costs money | Recording + code generation = $0, zero AI calls |
|
|
148
|
+
| Non-technical testers can't write tests | Anyone who can click a browser can create tests |
|
|
149
|
+
| 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
|
+
| Hard vs soft assertions | Soft assertions (`expect.soft()`) let the test continue — all failures reported at end |
|
|
151
|
+
| Recorded tests are fragile | 6-strategy locator resolution + post-run 5-level self-healing |
|
|
152
|
+
| Apps use iframes (SAP, Salesforce) | Auto-detects iframe context, generates `frameLocator()` chains — no manual frame handling |
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## RAG Memory (Retrieval-Augmented Generation)
|
|
157
|
+
|
|
158
|
+
The AI learns from every test run, building semantic memory that improves accuracy over time — **zero setup required**:
|
|
159
|
+
|
|
160
|
+
| Corpus | What it stores | When it's used |
|
|
161
|
+
|--------|---------------|----------------|
|
|
162
|
+
| **Code Corpus** | Instruction-to-code mappings from successful runs | During generation — similar past steps are retrieved as AI examples or used directly (score >= 0.90) |
|
|
163
|
+
| **Healing Corpus** | Past healing events (error + fix pairs) | During self-healing — proven past fixes are injected into the repair prompt |
|
|
164
|
+
| **Error Catalog** | Recurring error patterns per URL | During generation — the AI is warned about known-bad selectors to avoid |
|
|
165
|
+
|
|
166
|
+
**Zero cost, zero database** — uses local TF-IDF embeddings and file-based JSON storage (`results/.rag/`). Enabled by default — works automatically from the very first run.
|
|
167
|
+
|
|
168
|
+
### How it improves over time
|
|
169
|
+
|
|
170
|
+
- **Run 1** — memory is empty, AI generates code normally
|
|
171
|
+
- **Run 2+** — RAG kicks in silently: similar instructions are retrieved instead of making API calls (free + faster), healing uses proven past fixes
|
|
172
|
+
- **Run 10+** — most common steps are served from RAG memory at zero cost, self-healing resolves issues on the first attempt
|
|
173
|
+
|
|
174
|
+
### Consumer FAQ
|
|
175
|
+
|
|
176
|
+
| Question | Answer |
|
|
177
|
+
|----------|--------|
|
|
178
|
+
| Do I need to configure anything? | No. RAG is ON by default with zero setup. |
|
|
179
|
+
| Does it cost anything? | No. TF-IDF embedder runs locally. RAG direct hits replace paid AI calls. |
|
|
180
|
+
| Does it slow down my tests? | No. RAG lookup is <1ms. It actually speeds up generation. |
|
|
181
|
+
| Does it work in CI/CD? | Yes. Cache `results/.rag/` between CI runs to persist memory. |
|
|
182
|
+
| How do I share memory across team? | Commit `results/.rag/` to Git or use a CI cache step. |
|
|
183
|
+
| How do I reset memory? | Delete the `results/.rag/` folder. |
|
|
184
|
+
|
|
185
|
+
### When to use Settings → RAG Memory
|
|
186
|
+
|
|
187
|
+
Most users never need to touch RAG settings. The Settings card exists for power-user scenarios:
|
|
188
|
+
|
|
189
|
+
| Scenario | Action |
|
|
190
|
+
|----------|--------|
|
|
191
|
+
| Debugging a flaky test | Turn OFF Code Corpus — forces fresh AI generation |
|
|
192
|
+
| Healing keeps suggesting a bad fix | Turn OFF Healing Corpus — clears bad fix influence |
|
|
193
|
+
| Major app redesign | Turn OFF RAG entirely — old memory is now misleading |
|
|
194
|
+
| Error warnings are outdated | Turn OFF Error Catalog — stops avoiding selectors that are fine now |
|
|
195
|
+
| Want deterministic CI runs | Disable RAG in CI config, keep ON locally |
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
111
199
|
## Self-Healing
|
|
112
200
|
|
|
113
201
|
When your app's UI changes (button renamed, element moved, DOM restructured), tests break. Instead of failing immediately, Assuremind automatically attempts to fix the broken selector through a 5-level cascade — **fully automated, no manual intervention needed**:
|