Docs

Documentation

Everything you need to install, configure, and use AssureMind to automate testing without writing code.

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

OptionTypeDefaultDescription
baseUrlstringrequiredYour application's base URL. Used to resolve relative paths in test steps.
browsersstring[]['chromium']Browsers to run: chromium, firefox, webkit.
headlessbooleantrueRun without a visible browser window. Set to false to watch tests live.
timeoutnumber30000Per-step timeout in milliseconds.
retriesnumber1Number of retries before a step is marked failed.
parallelnumber2Number of parallel test workers.
devicestringPlaywright device descriptor, e.g. iPhone 15 Pro, Pixel 7.
healing.enabledbooleantrueEnable 5-level self-healing for broken selectors.
healing.maxLevel1–55Maximum healing level to attempt (1=smart retry, 5=decompose).
mcp.enabledbooleantrueAI sees real page elements via accessibility snapshots for ~90–95% accuracy.
rag.enabledbooleantrueSemantic RAG memory learns from past runs to reuse code without AI calls.
studioPortnumber4400Port 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
AssureMind also supports iframes, shadow DOM, file uploads ({{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.

TokenExample 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):

  1. Environment profilevariables/env.dev.json, variables/env.stage.json, etc.
  2. Global variablesvariables/global.json
  3. 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

CommandDescription
assuremind initScaffold folders, config file, and .env template.
assuremind studioStart the web UI at http://localhost:4400.
assuremind run --allRun all test suites.
assuremind run --type uiRun UI suites only. Also accepts api, audit.
assuremind run --suite "Login"Run suites whose name matches the given string.
assuremind run --tag smokeRun tests tagged with the given tag.
assuremind run --browser firefoxRun on a specific browser. Accepts chromium, firefox, webkit.
assuremind run --device "iPhone 15 Pro"Emulate a mobile device.
assuremind run --env stageUse stage environment variables.
assuremind run --parallel 4Run with 4 parallel workers.
assuremind run --headedShow the browser window during test execution.
assuremind run --ciCI mode: no prompts, exits with code 0 (pass) or 1 (fail).
assuremind run --no-healingDisable self-healing for this run.
assuremind generate "story"Generate a full test suite from a plain-English story.
assuremind apply-healingReview and accept self-healed selector changes.
assuremind validateCheck configuration health.
assuremind doctorSystem 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.

ProviderAI_PROVIDER valueKey variableNotes
Anthropic (Claude)anthropicANTHROPIC_API_KEYRecommended. Claude Sonnet is fast and accurate.
OpenAIopenaiOPENAI_API_KEYGPT-4o or GPT-4o-mini.
Google GeminigoogleGOOGLE_API_KEYGemini 2.5 Pro recommended.
GroqgroqGROQ_API_KEYVery fast inference.
DeepSeekdeepseekDEEPSEEK_API_KEYCost-effective.
Together AItogetherTOGETHER_API_KEYWide model selection.
QwenqwenQWEN_API_KEYStrong code generation.
PerplexityperplexityPERPLEXITY_API_KEY 
OllamaollamaOLLAMA_BASE_URLLocal, free, offline. qwen2.5-coder:7b recommended.
Amazon BedrockbedrockAWS credentialsUses AWS SDK auth.
Azure OpenAIazure-openaiAZURE_OPENAI_API_KEYEnterprise Azure deployments.
CustomcustomCUSTOM_AI_BASE_URLAny OpenAI-compatible API.

Self-Healing

When a selector fails, AssureMind cascades through up to 5 healing strategies automatically:

LevelStrategyDescription
1Smart RetryRetries the same locator with configurable waits. Handles transient timing issues.
2AI RegenAsks the AI to rewrite the failed locator using a fresh snapshot of the page.
3Multi-SelectorGenerates 5+ alternative locators and tries each in sequence.
4Visual AICaptures a screenshot and uses the AI to identify element coordinates visually.
5DecomposeBreaks 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.

Cost control: Set 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.

PageWhat you can do
DashboardOverview of all suites, recent run results, quick-start actions.
Smart TestsCreate, edit, filter, and bulk-manage test suites and cases.
Test EditorWrite steps in plain English, record by clicking, insert fake data tokens.
Run ConfigSelect browsers, device, parallelism, timeout, healing settings.
ReportsPass/fail results, step details, screenshots, videos, visual diffs, Lighthouse metrics.
VariablesManage global and environment-specific variables (secrets masked).
Self-HealingReview healing suggestions, accept or reject, view healing history.
Faker DataBrowse all 100+ generators and insert tokens directly into test steps.
CI/CDConfigure quality gates, PR comments, Slack/Teams, generate CI YAML files.
Git ControlInspect diffs, stage files, commit with AI-generated messages, push/pull.
SettingsMCP, RAG, visual regression, healing, output format settings.