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