assuremind 1.0.0 → 1.0.2
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 +394 -367
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,367 +1,394 @@
|
|
|
1
|
-
# Assuremind Studio
|
|
2
|
-
|
|
3
|
-
**AI-powered codeless UI & API automation framework**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
#
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
#
|
|
98
|
-
AI_PROVIDER=
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
#
|
|
104
|
-
AI_PROVIDER=
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
npx assuremind run --
|
|
153
|
-
|
|
154
|
-
# Run a
|
|
155
|
-
npx assuremind run --
|
|
156
|
-
|
|
157
|
-
#
|
|
158
|
-
npx assuremind run --tag
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
npx assuremind run --
|
|
165
|
-
npx assuremind run --
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
|
184
|
-
|
|
185
|
-
| `--
|
|
186
|
-
| `--
|
|
187
|
-
| `--
|
|
188
|
-
| `--
|
|
189
|
-
| `--
|
|
190
|
-
| `--
|
|
191
|
-
| `--
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
npx assuremind
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
|
285
|
-
|
|
286
|
-
|
|
|
287
|
-
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
---
|
|
364
|
-
|
|
365
|
-
##
|
|
366
|
-
|
|
367
|
-
|
|
1
|
+
# Assuremind Studio
|
|
2
|
+
|
|
3
|
+
**AI-powered codeless UI & API test automation framework**
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/assuremind)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://nodejs.org)
|
|
8
|
+
[](https://playwright.dev)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
- **Zero coding required** — describe test steps in plain English; AI generates Playwright code automatically
|
|
15
|
+
- **Three suite types** — **UI** (Playwright browser automation), **API** (HTTP tests), and **Audit** (Playwright + Lighthouse non-functional checks)
|
|
16
|
+
- **Audit suites** — run full Playwright automation with built-in Lighthouse scoring for Performance, Accessibility, and SEO; mark individual steps as Lighthouse checkpoints with the `⚡ Audit` flag
|
|
17
|
+
- **Device emulation** — emulate real mobile and tablet devices (iPhone 15 Pro, Pixel 7, iPad Pro, Galaxy S9+ and more) using Playwright's built-in device descriptors; configurable from the Studio UI or via `--device` CLI flag
|
|
18
|
+
- **Self-healing** — when a selector breaks, AI regenerates it automatically (6-level cascade)
|
|
19
|
+
- **Multi-AI-provider** — Anthropic, OpenAI, Google Gemini, Groq, DeepSeek, Together, Qwen, Perplexity, Ollama, AWS Bedrock, Azure OpenAI, custom endpoints
|
|
20
|
+
- **Studio UI** — browser-based test editor, run dashboard, healing review, reports with dark mode support
|
|
21
|
+
- **Git Control Center** — branch management, AI commit messages, conflict resolution from the UI
|
|
22
|
+
- **CI Config Generator** — generate ready-to-use GitHub Actions, GitLab CI, and Jenkins pipeline configs directly from Studio
|
|
23
|
+
- **Environment management** — switch between dev, staging, and prod with per-environment base URLs
|
|
24
|
+
- **Cost-optimised** — template engine + code cache minimise API calls; AI only runs when genuinely needed
|
|
25
|
+
- **CI-ready** — `npx assuremind run --all --ci` integrates with any pipeline; supports `--device` for mobile CI runs
|
|
26
|
+
- **File-based storage** — plain JSON, fully Git-friendly, no database required
|
|
27
|
+
- **Cross-platform** — macOS, Linux, Windows
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm install assuremind
|
|
35
|
+
npx assuremind init # creates folders, config, installs Playwright browsers
|
|
36
|
+
npx assuremind studio # opens web UI at http://localhost:4400
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
> **Requirements:** Node.js >= 18 · macOS / Linux / Windows
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Configuration
|
|
44
|
+
|
|
45
|
+
After `npx assuremind init`, edit `.env` with your AI provider:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# .env — choose one provider block
|
|
49
|
+
|
|
50
|
+
# Anthropic (Claude)
|
|
51
|
+
AI_PROVIDER=anthropic
|
|
52
|
+
ANTHROPIC_API_KEY=sk-ant-...
|
|
53
|
+
ANTHROPIC_MODEL=claude-sonnet-4-20250514 # optional
|
|
54
|
+
|
|
55
|
+
# OpenAI (GPT)
|
|
56
|
+
AI_PROVIDER=openai
|
|
57
|
+
OPENAI_API_KEY=sk-...
|
|
58
|
+
OPENAI_MODEL=gpt-4o # optional
|
|
59
|
+
|
|
60
|
+
# Google (Gemini)
|
|
61
|
+
AI_PROVIDER=google
|
|
62
|
+
GOOGLE_API_KEY=AIza...
|
|
63
|
+
GOOGLE_MODEL=gemini-2.5-flash # optional
|
|
64
|
+
|
|
65
|
+
# Groq (fast inference)
|
|
66
|
+
AI_PROVIDER=groq
|
|
67
|
+
GROQ_API_KEY=gsk_...
|
|
68
|
+
GROQ_MODEL=llama-3.3-70b-versatile # optional
|
|
69
|
+
|
|
70
|
+
# DeepSeek
|
|
71
|
+
AI_PROVIDER=deepseek
|
|
72
|
+
DEEPSEEK_API_KEY=sk-...
|
|
73
|
+
|
|
74
|
+
# Together AI
|
|
75
|
+
AI_PROVIDER=together
|
|
76
|
+
TOGETHER_API_KEY=...
|
|
77
|
+
|
|
78
|
+
# Perplexity
|
|
79
|
+
AI_PROVIDER=perplexity
|
|
80
|
+
PERPLEXITY_API_KEY=pplx-...
|
|
81
|
+
|
|
82
|
+
# Qwen (Alibaba)
|
|
83
|
+
AI_PROVIDER=qwen
|
|
84
|
+
QWEN_API_KEY=...
|
|
85
|
+
|
|
86
|
+
# Ollama (local)
|
|
87
|
+
AI_PROVIDER=ollama
|
|
88
|
+
OLLAMA_BASE_URL=http://localhost:11434 # optional
|
|
89
|
+
OLLAMA_MODEL=llama3.3 # optional
|
|
90
|
+
|
|
91
|
+
# AWS Bedrock
|
|
92
|
+
AI_PROVIDER=bedrock
|
|
93
|
+
AWS_ACCESS_KEY_ID=...
|
|
94
|
+
AWS_SECRET_ACCESS_KEY=...
|
|
95
|
+
AWS_REGION=us-east-1
|
|
96
|
+
|
|
97
|
+
# Azure OpenAI
|
|
98
|
+
AI_PROVIDER=azure-openai
|
|
99
|
+
AZURE_OPENAI_API_KEY=...
|
|
100
|
+
AZURE_OPENAI_ENDPOINT=https://my-resource.openai.azure.com
|
|
101
|
+
AZURE_OPENAI_DEPLOYMENT=my-deployment
|
|
102
|
+
|
|
103
|
+
# Custom OpenAI-compatible endpoint
|
|
104
|
+
AI_PROVIDER=custom
|
|
105
|
+
CUSTOM_API_KEY=...
|
|
106
|
+
CUSTOM_BASE_URL=https://my-endpoint.com/v1
|
|
107
|
+
CUSTOM_MODEL=my-model
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Edit `autotest.config.ts` for test execution settings (base URL, browsers, timeouts, healing, etc.). Or use the **Settings** page in Studio to configure everything from the browser.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## CLI Commands
|
|
115
|
+
|
|
116
|
+
### `npx assuremind init`
|
|
117
|
+
|
|
118
|
+
Initialises a project — creates folders, `.env`, config files, and installs Playwright browsers.
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
npx assuremind init
|
|
122
|
+
npx assuremind init --skip-playwright # skip browser installation
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### `npx assuremind studio`
|
|
126
|
+
|
|
127
|
+
Starts the web UI at `http://localhost:4400`.
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
npx assuremind studio
|
|
131
|
+
npx assuremind studio --port 5000
|
|
132
|
+
npx assuremind studio --no-open # don't auto-open browser
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### `npx assuremind run`
|
|
136
|
+
|
|
137
|
+
Runs tests from the command line. Filters are combinable with AND logic.
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
# Run everything
|
|
141
|
+
npx assuremind run --all
|
|
142
|
+
|
|
143
|
+
# Filter by suite type
|
|
144
|
+
npx assuremind run --type ui
|
|
145
|
+
npx assuremind run --type api
|
|
146
|
+
npx assuremind run --type audit
|
|
147
|
+
|
|
148
|
+
# Run a suite (case-insensitive partial match)
|
|
149
|
+
npx assuremind run --suite "Login Tests"
|
|
150
|
+
|
|
151
|
+
# Run by tag
|
|
152
|
+
npx assuremind run --tag smoke
|
|
153
|
+
|
|
154
|
+
# Run a single test (case-insensitive partial match)
|
|
155
|
+
npx assuremind run --test "User can log in with valid credentials"
|
|
156
|
+
|
|
157
|
+
# Combine filters
|
|
158
|
+
npx assuremind run --type audit --tag regression
|
|
159
|
+
npx assuremind run --suite "Orange HRM" --tag smoke
|
|
160
|
+
npx assuremind run --type audit --test "Login Page"
|
|
161
|
+
|
|
162
|
+
# Device emulation (mobile/tablet)
|
|
163
|
+
npx assuremind run --all --device "iPhone 15 Pro" --browser chromium
|
|
164
|
+
npx assuremind run --tag smoke --device "Pixel 7" --browser chromium
|
|
165
|
+
npx assuremind run --all --device "iPad Pro 11" --browser webkit
|
|
166
|
+
|
|
167
|
+
# With options
|
|
168
|
+
npx assuremind run --all \
|
|
169
|
+
--browser chromium firefox \
|
|
170
|
+
--parallel 4 \
|
|
171
|
+
--headed \
|
|
172
|
+
--ci \
|
|
173
|
+
--no-healing \
|
|
174
|
+
--reporter allure json
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
| Flag | Description |
|
|
178
|
+
|------|-------------|
|
|
179
|
+
| `--all` | Run every suite |
|
|
180
|
+
| `--type <type>` | Filter by suite type: `ui`, `api`, or `audit` |
|
|
181
|
+
| `--suite <name>` | Run suites whose name contains `<name>` |
|
|
182
|
+
| `--tag <tag>` | Run all cases with this tag |
|
|
183
|
+
| `--test <name>` | Run cases whose name contains `<name>` |
|
|
184
|
+
| `--browser <list>` | Browsers: `chromium` `firefox` `webkit` |
|
|
185
|
+
| `--device <name>` | Emulate a device (e.g. `"iPhone 15 Pro"`, `"Pixel 7"`, `"iPad Pro 11"`) |
|
|
186
|
+
| `--env <name>` | Variable environment: `dev` `staging` `prod` |
|
|
187
|
+
| `--parallel <n>` | Concurrent workers |
|
|
188
|
+
| `--headed` | Show browser window |
|
|
189
|
+
| `--ci` | CI mode — minimal output, exit code reflects pass/fail |
|
|
190
|
+
| `--no-healing` | Disable self-healing for this run |
|
|
191
|
+
| `--reporter <list>` | `allure` `html` `json` |
|
|
192
|
+
|
|
193
|
+
### `npx assuremind generate`
|
|
194
|
+
|
|
195
|
+
Generates a test suite from a plain-English user story using AI.
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
npx assuremind generate \
|
|
199
|
+
--story "User logs in with valid credentials and sees the dashboard"
|
|
200
|
+
|
|
201
|
+
npx assuremind generate \
|
|
202
|
+
--story-file ./stories/checkout.txt \
|
|
203
|
+
--suite "Checkout Flow"
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### `npx assuremind apply-healing`
|
|
207
|
+
|
|
208
|
+
Reviews and applies self-healing suggestions to test files.
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
# Interactive review
|
|
212
|
+
npx assuremind apply-healing
|
|
213
|
+
|
|
214
|
+
# Accept all pending heals without prompting
|
|
215
|
+
npx assuremind apply-healing --yes
|
|
216
|
+
|
|
217
|
+
# Load from a specific report file
|
|
218
|
+
npx assuremind apply-healing --from results/healing/healing-report-<runId>.json
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### `npx assuremind validate`
|
|
222
|
+
|
|
223
|
+
Validates your config, environment variables, and test files.
|
|
224
|
+
|
|
225
|
+
### `npx assuremind doctor`
|
|
226
|
+
|
|
227
|
+
Checks system requirements, AI provider connectivity, and configuration health.
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Studio UI
|
|
232
|
+
|
|
233
|
+
Open `http://localhost:4400` after running `npx assuremind studio`. The UI supports **light and dark mode**.
|
|
234
|
+
|
|
235
|
+
| Page | Description |
|
|
236
|
+
|------|-------------|
|
|
237
|
+
| **Dashboard** | Run health overview, live progress, recent results, pass-rate trend sparklines |
|
|
238
|
+
| **Smart Tests** | Paste a user story or Jira link — AI creates a full test suite |
|
|
239
|
+
| **Test Editor** | 3-level editor: suites → cases → steps, with inline AI code generation |
|
|
240
|
+
| **Run Config** | Configure browsers, device emulation, parallelism and launch runs from the browser |
|
|
241
|
+
| **Reports** | Run history, pass/fail drill-down, Lighthouse score tabs (⚡ Speed, ♿ A11y, 🔍 SEO) for Audit suites, device badge per case, Allure report link |
|
|
242
|
+
| **Variables** | Manage `{{VARIABLE_NAME}}` tokens across all tests and environments |
|
|
243
|
+
| **Self-Healing** | Review and accept / reject AI-generated selector fixes |
|
|
244
|
+
| **Step Library** | Reusable step snippets shared across suites |
|
|
245
|
+
| **Docs** | Built-in documentation, CLI reference, and feature guides |
|
|
246
|
+
| **Git Control Center** | Branch management, AI commit messages, push/pull, conflict resolution |
|
|
247
|
+
| **Settings** | Environment management, browsers, healing thresholds, capture settings |
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## Device Emulation
|
|
252
|
+
|
|
253
|
+
Assuremind supports full Playwright device emulation — viewport, user-agent, DPR, touch, and mobile flags — for real-device testing without physical hardware.
|
|
254
|
+
|
|
255
|
+
**From the Studio UI** — open **Run Config**, expand the Device Emulation panel, and pick any preset from the Desktop / Mobile / Tablet catalogue.
|
|
256
|
+
|
|
257
|
+
**From the CLI:**
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
npx assuremind run --all --device "iPhone 15 Pro" --browser chromium
|
|
261
|
+
npx assuremind run --all --device "Pixel 7" --browser chromium
|
|
262
|
+
npx assuremind run --all --device "iPad Pro 11" --browser webkit
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
**Supported device presets (selection):**
|
|
266
|
+
|
|
267
|
+
| Device | Viewport | DPR | Browser |
|
|
268
|
+
|--------|----------|-----|---------|
|
|
269
|
+
| iPhone 15 Pro | 393 × 852 | 3 | Chromium |
|
|
270
|
+
| iPhone 15 | 393 × 852 | 3 | Chromium |
|
|
271
|
+
| Pixel 7 | 412 × 915 | 2.625 | Chromium |
|
|
272
|
+
| Galaxy S9+ | 320 × 658 | 4.5 | Chromium |
|
|
273
|
+
| iPad Pro 11 | 834 × 1194 | 2 | WebKit |
|
|
274
|
+
| iPad Mini | 768 × 1024 | 2 | WebKit |
|
|
275
|
+
|
|
276
|
+
> **Note:** Device emulation requires Chromium for Android devices and WebKit for Apple devices. A warning is shown in the UI when an incompatible combination is selected.
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Self-Healing
|
|
281
|
+
|
|
282
|
+
When a test step fails, Assuremind attempts up to 6 healing levels before marking the step as failed:
|
|
283
|
+
|
|
284
|
+
| Level | Strategy | AI Cost |
|
|
285
|
+
|-------|----------|---------|
|
|
286
|
+
| 1 | Smart Retry — wait + retry with backoff | None |
|
|
287
|
+
| 2 | AI Regeneration — AI rewrites the Playwright code | Yes |
|
|
288
|
+
| 3 | Multi-Selector — try alternate selectors (ID, text, role, aria) | Yes |
|
|
289
|
+
| 4 | Visual/SoM — screenshot + AI visual analysis | Yes |
|
|
290
|
+
| 5 | Decompose — break step into smaller sub-actions | Yes |
|
|
291
|
+
| 6 | Manual — flag for human review | None |
|
|
292
|
+
|
|
293
|
+
AI healing costs are tracked against a configurable daily budget (`healing.dailyBudget` in USD). Healed steps are saved as **pending events** for your review — run `npx assuremind apply-healing` or visit the **Self-Healing** page in Studio to accept or reject each fix.
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Variables
|
|
298
|
+
|
|
299
|
+
Use `{{VARIABLE_NAME}}` tokens in step instructions. Variables are resolved at run time from your variable files:
|
|
300
|
+
|
|
301
|
+
```json
|
|
302
|
+
// variables/global.json
|
|
303
|
+
{
|
|
304
|
+
"BASE_URL": "http://localhost:3000",
|
|
305
|
+
"ADMIN_EMAIL": "admin@example.com"
|
|
306
|
+
}
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
Step instruction: `Navigate to {{BASE_URL}}/login and enter {{ADMIN_EMAIL}}`
|
|
310
|
+
|
|
311
|
+
Secret variables (marked with `"secret": true`) are masked in logs and reports.
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## CI/CD Integration
|
|
316
|
+
|
|
317
|
+
### GitHub Actions
|
|
318
|
+
|
|
319
|
+
```yaml
|
|
320
|
+
- name: Run Assuremind tests
|
|
321
|
+
env:
|
|
322
|
+
AI_PROVIDER: anthropic
|
|
323
|
+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
324
|
+
run: |
|
|
325
|
+
npx assuremind run --all --ci --no-healing
|
|
326
|
+
|
|
327
|
+
# Mobile run
|
|
328
|
+
- name: Run mobile tests
|
|
329
|
+
run: |
|
|
330
|
+
npx assuremind run --all --browser chromium --device "iPhone 15 Pro" --ci
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### GitLab CI
|
|
334
|
+
|
|
335
|
+
```yaml
|
|
336
|
+
test:
|
|
337
|
+
image: node:20
|
|
338
|
+
script:
|
|
339
|
+
- npx assuremind run --all --browser chromium --parallel 2 --ci
|
|
340
|
+
variables:
|
|
341
|
+
AI_PROVIDER: anthropic
|
|
342
|
+
ANTHROPIC_API_KEY: $ANTHROPIC_API_KEY
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### Jenkins
|
|
346
|
+
|
|
347
|
+
```groovy
|
|
348
|
+
stage('Test') {
|
|
349
|
+
environment {
|
|
350
|
+
AI_PROVIDER = 'anthropic'
|
|
351
|
+
ANTHROPIC_API_KEY = credentials('anthropic-api-key')
|
|
352
|
+
}
|
|
353
|
+
steps {
|
|
354
|
+
sh 'npx assuremind run --all --browser chromium --parallel 2 --ci'
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
> **Tip:** Use the **CI Config Generator** in Studio (**Run Config** page → *Generate CI Config*) to produce a ready-to-paste config for your platform, pre-filled with your current browser, parallel, and device settings.
|
|
360
|
+
|
|
361
|
+
Exit code `0` = all tests passed · `1` = at least one test failed.
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
## Security
|
|
366
|
+
|
|
367
|
+
- Generated Playwright code runs inside a sandboxed `new Function('page', 'context', 'expect', code)` — only `page`, `context`, and `expect` are available
|
|
368
|
+
- Secret variables are never sent to AI providers, never logged, never included in reports
|
|
369
|
+
- All generated code is validated against a forbidden-pattern list before execution
|
|
370
|
+
- Atomic file writes prevent partially-written results on crash
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
## Tiered AI Mode (Cost Optimisation)
|
|
375
|
+
|
|
376
|
+
Enable tiered mode to use a cheaper/faster model for simple steps and a more capable model for complex ones:
|
|
377
|
+
|
|
378
|
+
```bash
|
|
379
|
+
AI_TIERED_ENABLED=true
|
|
380
|
+
AI_TIERED_FAST_PROVIDER=groq
|
|
381
|
+
AI_TIERED_FAST_MODEL=llama-3.1-8b-instant
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
The smart router applies (in order): template pattern matching → code cache lookup → batch generation → fast model → primary model.
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
## License
|
|
389
|
+
|
|
390
|
+
MIT — see [LICENSE](LICENSE) for details.
|
|
391
|
+
|
|
392
|
+
---
|
|
393
|
+
|
|
394
|
+
*Built by [Deepak Hiremath](https://www.linkedin.com/in/deepak-hiremath-0017937a/)*
|