Installation
Install AssureMind and Playwright browsers via npm. Node.js 18+ is required.
# Install AssureMind npm install assuremind # Install Playwright browsers (Chromium is sufficient to start) npx playwright install chromium # Scaffold folders, config file, and example .env npx assuremind init
Running init creates the following structure in your project root:
your-project/ ├── autotest.config.ts # Framework configuration ├── .env # AI provider keys (gitignored) ├── tests/ # Test suites (JSON) │ ├── ui/ │ ├── api/ │ └── audit/ ├── variables/ # Global & env variables └── fixtures/uploads/ # Test file fixtures
Quick Start
1. Configure your AI provider
Add your provider credentials to .env in the project root. AssureMind supports 12 providers — pick one:
# Anthropic (Claude) — recommended AI_PROVIDER=anthropic ANTHROPIC_API_KEY=sk-ant-... # OpenAI AI_PROVIDER=openai OPENAI_API_KEY=sk-... # Ollama — local, completely free AI_PROVIDER=ollama OLLAMA_BASE_URL=http://localhost:11434 OLLAMA_MODEL=qwen2.5-coder:7b
2. Open the Studio
npx assuremind studio # Opens http://localhost:4400 in your browser
3. Create a test suite
In the Studio, click Smart Tests → New Suite. Select the suite type (UI, API, or Audit), give it a name, and add your test steps in plain English.
4. Run your tests
# Run all suites npx assuremind run --all # Run with visible browser window npx assuremind run --all --headed
Configuration
AssureMind is configured via autotest.config.ts in the project root. Use the exported defineConfig helper for type safety:
import { defineConfig } from 'assuremind'; export default defineConfig({ baseUrl: 'http://localhost:3000', browsers: ['chromium'], headless: true, timeout: 30000, retries: 1, parallel: 2, healing: { enabled: true, maxLevel: 5 }, mcp: { enabled: true }, rag: { enabled: true }, });
Key options
| Option | Type | Default | Description |
|---|---|---|---|
| baseUrl | string | required | Your application's base URL. Used to resolve relative paths in test steps. |
| browsers | string[] | ['chromium'] | Browsers to run: chromium, firefox, webkit. |
| headless | boolean | true | Run without a visible browser window. Set to false to watch tests live. |
| timeout | number | 30000 | Per-step timeout in milliseconds. |
| retries | number | 1 | Number of retries before a step is marked failed. |
| parallel | number | 2 | Number of parallel test workers. |
| device | string | — | Playwright device descriptor, e.g. iPhone 15 Pro, Pixel 7. |
| healing.enabled | boolean | true | Enable 5-level self-healing for broken selectors. |
| healing.maxLevel | 1–5 | 5 | Maximum healing level to attempt (1=smart retry, 5=decompose). |
| mcp.enabled | boolean | true | AI sees real page elements via accessibility snapshots for ~90–95% accuracy. |
| rag.enabled | boolean | true | Semantic RAG memory learns from past runs to reuse code without AI calls. |
| studioPort | number | 4400 | Port for the Studio web UI. |
UI Tests
UI tests automate a real browser using Playwright. Write steps in plain English — AssureMind generates the Playwright code for you.
Example steps
Navigate to /login Enter "admin@example.com" in the Email field Enter {{ADMIN_PASSWORD}} in the Password field Click the "Sign In" button Verify "Welcome back" is visible Take a screenshot Click the user avatar in the top-right corner Select "Logout" from the dropdown menu
{{FILE:resume.pdf}}), downloads, and visual regression screenshot comparison.
Test recording
Open the Studio → Test Editor → click Record. AssureMind launches a browser you interact with normally — every click and input becomes a test step automatically. Zero AI cost, works with iframes and shadow DOM.
API Tests
API test suites send HTTP requests and assert on responses — all described in plain English.
Example steps
Send GET to {{BASE_URL}}/api/health and verify status is 200 POST to {{BASE_URL}}/api/login with body: { "email": "{{ADMIN_EMAIL}}", "password": "{{ADMIN_PASSWORD}}" } Save token as AUTH_TOKEN Verify response field "success" equals true GET {{BASE_URL}}/api/users with header Authorization: Bearer {{AUTH_TOKEN}} Verify the response array has at least 1 item
Audit Tests
Audit suites run Playwright to navigate your app, then attach a Lighthouse audit to measure performance, accessibility, and SEO scores at specific points in the user journey.
Example steps
Navigate to / Wait for the page to fully load Run Lighthouse audit on performance, accessibility, seo Verify performance score is above 80 Verify accessibility score is above 90
Fake Data
Use {{FAKE_CATEGORY_METHOD}} tokens anywhere in a test step to inject fresh, random data on every run. No stale emails or duplicate records.
| Token | Example output |
|---|---|
| {{FAKE_PERSON_FIRSTNAME}} | Sarah |
| {{FAKE_PERSON_LASTNAME}} | Mitchell |
| {{FAKE_INTERNET_EMAIL}} | sarah.m@example.net |
| {{FAKE_INTERNET_PASSWORD}} | Xk#9mP!2qr |
| {{FAKE_PHONE_NUMBER}} | +1 (555) 234-7891 |
| {{FAKE_LOCATION_CITY}} | Portland |
| {{FAKE_COMPANY_NAME}} | Greenfield Solutions |
| {{FAKE_FINANCE_CREDITCARDNUMBER}} | 4111111111111111 |
| {{FAKE_DATE_FUTURE}} | 2027-03-14 |
| {{FAKE_LOREM_SENTENCE}} | Lorem ipsum dolor sit amet. |
100+ generators across 16 categories: person, internet, phone, location, company, finance, date, lorem, image, hacker, music, vehicle, word, color, database, commerce. Browse them in the Studio under Faker Data.
Variables
Use {{VAR_NAME}} tokens in test steps. Variables are resolved at run time from three sources (in order of precedence):
- Environment profile —
variables/env.dev.json,variables/env.stage.json, etc. - Global variables —
variables/global.json - Runtime captured values — set by steps like "save response token as AUTH_TOKEN"
// variables/global.json { "ADMIN_EMAIL": "admin@example.com", "BASE_URL": "http://localhost:3000" } // variables/env.stage.json { "BASE_URL": "https://stage.example.com" }
Run with a specific environment: npx assuremind run --all --env stage
CLI Reference
| Command | Description |
|---|---|
| assuremind init | Scaffold folders, config file, and .env template. |
| assuremind studio | Start the web UI at http://localhost:4400. |
| assuremind run --all | Run all test suites. |
| assuremind run --type ui | Run UI suites only. Also accepts api, audit. |
| assuremind run --suite "Login" | Run suites whose name matches the given string. |
| assuremind run --tag smoke | Run tests tagged with the given tag. |
| assuremind run --browser firefox | Run on a specific browser. Accepts chromium, firefox, webkit. |
| assuremind run --device "iPhone 15 Pro" | Emulate a mobile device. |
| assuremind run --env stage | Use stage environment variables. |
| assuremind run --parallel 4 | Run with 4 parallel workers. |
| assuremind run --headed | Show the browser window during test execution. |
| assuremind run --ci | CI mode: no prompts, exits with code 0 (pass) or 1 (fail). |
| assuremind run --no-healing | Disable self-healing for this run. |
| assuremind generate "story" | Generate a full test suite from a plain-English story. |
| assuremind apply-healing | Review and accept self-healed selector changes. |
| assuremind validate | Check configuration health. |
| assuremind doctor | System diagnostics — Node version, Playwright, AI provider. |
AI Providers
Set AI_PROVIDER in .env to select the provider. Each provider also needs its corresponding API key or endpoint.
| Provider | AI_PROVIDER value | Key variable | Notes |
|---|---|---|---|
| Anthropic (Claude) | anthropic | ANTHROPIC_API_KEY | Recommended. Claude Sonnet is fast and accurate. |
| OpenAI | openai | OPENAI_API_KEY | GPT-4o or GPT-4o-mini. |
| Google Gemini | GOOGLE_API_KEY | Gemini 2.5 Pro recommended. | |
| Groq | groq | GROQ_API_KEY | Very fast inference. |
| DeepSeek | deepseek | DEEPSEEK_API_KEY | Cost-effective. |
| Together AI | together | TOGETHER_API_KEY | Wide model selection. |
| Qwen | qwen | QWEN_API_KEY | Strong code generation. |
| Perplexity | perplexity | PERPLEXITY_API_KEY | |
| Ollama | ollama | OLLAMA_BASE_URL | Local, free, offline. qwen2.5-coder:7b recommended. |
| Amazon Bedrock | bedrock | AWS credentials | Uses AWS SDK auth. |
| Azure OpenAI | azure-openai | AZURE_OPENAI_API_KEY | Enterprise Azure deployments. |
| Custom | custom | CUSTOM_AI_BASE_URL | Any OpenAI-compatible API. |
Self-Healing
When a selector fails, AssureMind cascades through up to 5 healing strategies automatically:
| Level | Strategy | Description |
|---|---|---|
| 1 | Smart Retry | Retries the same locator with configurable waits. Handles transient timing issues. |
| 2 | AI Regen | Asks the AI to rewrite the failed locator using a fresh snapshot of the page. |
| 3 | Multi-Selector | Generates 5+ alternative locators and tries each in sequence. |
| 4 | Visual AI | Captures a screenshot and uses the AI to identify element coordinates visually. |
| 5 | Decompose | Breaks complex steps into smaller sub-steps the AI executes independently. |
Healed selectors are saved as pending events. Review and accept them in the Studio under Self-Healing, or run npx assuremind apply-healing from the CLI. Once accepted, the updated code is written back to your test files — making the fix permanent.
healing.dailyBudget in autotest.config.ts to cap the daily AI spend on healing (e.g., dailyBudget: 2.00 = $2/day max).
Studio UI
Run npx assuremind studio to open the visual editor at http://localhost:4400. The Studio replaces the need for a terminal during test development.
| Page | What you can do |
|---|---|
| Dashboard | Overview of all suites, recent run results, quick-start actions. |
| Smart Tests | Create, edit, filter, and bulk-manage test suites and cases. |
| Test Editor | Write steps in plain English, record by clicking, insert fake data tokens. |
| Run Config | Select browsers, device, parallelism, timeout, healing settings. |
| Reports | Pass/fail results, step details, screenshots, videos, visual diffs, Lighthouse metrics. |
| Variables | Manage global and environment-specific variables (secrets masked). |
| Self-Healing | Review healing suggestions, accept or reject, view healing history. |
| Faker Data | Browse all 100+ generators and insert tokens directly into test steps. |
| CI/CD | Configure quality gates, PR comments, Slack/Teams, generate CI YAML files. |
| Git Control | Inspect diffs, stage files, commit with AI-generated messages, push/pull. |
| Settings | MCP, RAG, visual regression, healing, output format settings. |