assuremind
v1.2.1
Published
AI-powered codeless UI & API automation framework
Maintainers
Readme
Assuremind Studio
AI-powered codeless UI & API test automation framework
Describe tests in plain English. AI generates Playwright code. Run anywhere.
Why Assuremind?
| Capability | What it does |
|-----------|-------------|
| Zero coding | Write steps in plain English — AI generates Playwright code automatically |
| MCP-sighted generation | AI sees real page elements via Playwright MCP accessibility snapshots (~90-95% accuracy) |
| 3 suite types | UI (browser automation) · API (HTTP tests) · Audit (Playwright + Lighthouse) |
| 5-level self-healing | Broken selectors are auto-fixed by AI during runs — smart retry → AI regen → multi-selector → visual → decompose |
| 12 AI providers | Anthropic · OpenAI · Gemini · Groq · DeepSeek · Together · Qwen · Perplexity · Ollama · Bedrock · Azure OpenAI · Custom |
| Device emulation | iPhone, Pixel, iPad, Galaxy — full Playwright device descriptors from UI or --device CLI flag |
| Studio UI | Browser-based editor, run dashboard, reports, healing review, git control center — with dark mode |
| RAG memory | AI learns from every run — retrieves similar past steps & healing fixes for smarter generation |
| Test Recorder | Record tests by clicking in a real browser — locators verified against Playwright's accessibility tree, zero AI cost |
| Cost-optimised | Template engine + code cache + RAG handle ~80% of steps with zero AI calls |
| CI-ready | npx assuremind run --all --ci — exit code 0/1, works with any pipeline |
| File-based | Plain JSON storage, fully Git-friendly, no database |
Quick Start
npm install assuremind
npx assuremind init # folders, config, Playwright browsers
npx assuremind studio # opens http://localhost:4400Requirements: Node.js >= 18 · macOS / Linux / Windows
Configure AI Provider
Edit .env — pick one provider:
# Anthropic # OpenAI # Google
AI_PROVIDER=anthropic AI_PROVIDER=openai AI_PROVIDER=google
ANTHROPIC_API_KEY=sk-ant-... OPENAI_API_KEY=sk-... GOOGLE_API_KEY=AIza...
ANTHROPIC_MODEL=claude-sonnet.. OPENAI_MODEL=gpt-4o GOOGLE_MODEL=gemini-2.5-proSee .env.example for all 12 providers including Gemini, OpenAI, Anthropic, Ollama (local/free), etc.
CLI
npx assuremind run --all # run everything
npx assuremind run --type ui --tag smoke # filter by type + tag
npx assuremind run --suite "Login" --browser chromium # run a suite
npx assuremind run --all --device "iPhone 15 Pro" --ci # mobile + CI mode
npx assuremind generate --story "User resets password" # AI generates full suite
npx assuremind apply-healing --yes # accept all healed selectors
npx assuremind validate # check config health
npx assuremind doctor # system diagnostics| Flag | Description |
|------|-------------|
| --all | Run every suite |
| --type <ui\|api\|audit> | Filter by suite type |
| --suite <name> | Partial name match |
| --tag <tag> | Filter by tag |
| --device <name> | Emulate device (e.g. "iPhone 15 Pro", "Pixel 7") |
| --browser <list> | chromium firefox webkit |
| --ci | CI mode — exit code reflects pass/fail |
| --headed | Show browser window |
| --no-healing | Disable self-healing |
Full reference → docs/CLI-REFERENCE.md
Studio UI
Start with npx assuremind studio — opens at http://localhost:4400.
Dashboard · Smart Tests · Test Editor · Run Config · Reports · Variables · Self-Healing · Step Library · Git Control · Settings · Docs
Full walkthrough → docs/STUDIO.md
MCP Integration
AI sees real page elements during code generation via the official @playwright/mcp server. Enabled by default.
| Mode | Accuracy | Latency | Config |
|------|----------|---------|--------|
| Blind (MCP off) | ~50-70% | Fastest | mcp.enabled: false |
| Snapshot-driven | ~90-95% | +2-5s first page | mcp.enabled: true (default) |
| Act-then-script | ~98-100% | +5-10s/step | mcp.actThenScript: true |
- MCP is only used during code generation — test execution is never affected
- Silent fallback — if MCP fails, generation continues blindly without error
- Configure in Settings → MCP Integration or
autotest.config.json
Test Recorder
Record tests by interacting with your application in a real browser — zero AI, zero cost, zero guesswork.
Click Record in the Test Editor, perform your actions, and stop. Each interaction becomes a step with verified Playwright code, ready to run.
How it works
- A headed Chromium browser opens your app's URL
- Every click, fill, and navigation is captured in real time — including inside iframes
- 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 - Iframe-aware — elements inside iframes automatically generate
page.frameLocator('#iframe').getByRole(...)code with the correct frame chain - Assertions via keyboard shortcuts: Shift+Click (element visible), Ctrl+Shift+U (URL), Ctrl+Shift+T (page title)
- On stop, each action is added as a step with pre-generated Playwright code — no AI call needed
What makes it stand out vs other recorders
| Feature | Selenium IDE | Playwright Codegen | Assuremind Recorder |
|---------|-------------|-------------------|---------------------|
| Locator quality | CSS/XPath | Good | Best — 6 strategies, verified against live page |
| Accessibility tree | No | Partial | Full — every locator checked via Playwright API |
| Iframe support | Partial | Manual | Auto — detects iframes, generates frameLocator() code |
| Assertions | Manual | Manual | Shift+Click (hard), Ctrl+Shift+Click (soft), URL & title shortcuts |
| Plain-English steps | No | No | Yes — human-readable instructions auto-generated |
| Self-healing after | No | No | Yes — 5-level AI healing cascade |
| RAG memory | No | No | Yes — recorded steps feed the learning loop |
| Cost | Free | Free | Free |
Biggest pain points in test automation — solved
| Pain Point | How the Recorder Solves It |
|-----------|---------------------------|
| Writing tests is slow | Record a full test in 30 seconds |
| Selectors break constantly | Locators verified against Playwright's accessibility tree in real time |
| AI costs money | Recording + code generation = $0, zero AI calls |
| Non-technical testers can't write tests | Anyone who can click a browser can create tests |
| Assertions are hard to write | Shift+Click for hard, Ctrl+Shift+Click for soft, Ctrl+Shift+U for URL, Ctrl+Shift+T for title |
| Hard vs soft assertions | Soft assertions (expect.soft()) let the test continue — all failures reported at end |
| Recorded tests are fragile | 6-strategy locator resolution + post-run 5-level self-healing |
| Apps use iframes (SAP, Salesforce) | Auto-detects iframe context, generates frameLocator() chains — no manual frame handling |
RAG Memory (Retrieval-Augmented Generation)
The AI learns from every test run, building semantic memory that improves accuracy over time — zero setup required:
| Corpus | What it stores | When it's used | |--------|---------------|----------------| | 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) | | Healing Corpus | Past healing events (error + fix pairs) | During self-healing — proven past fixes are injected into the repair prompt | | Error Catalog | Recurring error patterns per URL | During generation — the AI is warned about known-bad selectors to avoid |
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.
How it improves over time
- Run 1 — memory is empty, AI generates code normally
- Run 2+ — RAG kicks in silently: similar instructions are retrieved instead of making API calls (free + faster), healing uses proven past fixes
- Run 10+ — most common steps are served from RAG memory at zero cost, self-healing resolves issues on the first attempt
Consumer FAQ
| Question | Answer |
|----------|--------|
| Do I need to configure anything? | No. RAG is ON by default with zero setup. |
| Does it cost anything? | No. TF-IDF embedder runs locally. RAG direct hits replace paid AI calls. |
| Does it slow down my tests? | No. RAG lookup is <1ms. It actually speeds up generation. |
| Does it work in CI/CD? | Yes. Cache results/.rag/ between CI runs to persist memory. |
| How do I share memory across team? | Commit results/.rag/ to Git or use a CI cache step. |
| How do I reset memory? | Delete the results/.rag/ folder. |
When to use Settings → RAG Memory
Most users never need to touch RAG settings. The Settings card exists for power-user scenarios:
| Scenario | Action | |----------|--------| | Debugging a flaky test | Turn OFF Code Corpus — forces fresh AI generation | | Healing keeps suggesting a bad fix | Turn OFF Healing Corpus — clears bad fix influence | | Major app redesign | Turn OFF RAG entirely — old memory is now misleading | | Error warnings are outdated | Turn OFF Error Catalog — stops avoiding selectors that are fine now | | Want deterministic CI runs | Disable RAG in CI config, keep ON locally |
Self-Healing
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:
| Level | What happens | Example | AI Cost |
|-------|-------------|---------|---------|
| 1 | Smart retry — waits for the element with exponential backoff | Element was loading slowly; retry finds it after 2s | Free |
| 2 | AI regeneration — AI rewrites the Playwright code using current page context | #login-btn removed → AI generates page.getByRole('button', { name: 'Sign In' }) | 1 call |
| 3 | Multi-selector — AI generates 5 alternative selector strategies, tries each | Tries role → label → placeholder → text → CSS until one works | 1 call |
| 4 | Visual analysis — takes a screenshot, AI visually locates the element | Button has no text/role but AI sees it in the screenshot | 1 call |
| 5 | Decompose — breaks the failing step into 3-5 simpler micro-actions | "Fill login form and submit" → separate fill email + fill password + click submit | 1 call |
If all 5 levels fail, the step is marked failed and saved to the healing report for your review.
How you use it
- During test runs — healing happens automatically. If Level 2 fixes a broken
#login-btn, your test passes and continues. - After the run — healed selectors are saved as pending suggestions (not auto-applied to source files).
- Review & accept — in Studio → Self-Healing page, or from CLI:
npx assuremind apply-healing # interactive review: accept/reject each fix npx assuremind apply-healing --yes # accept all in CI - Accepted fixes are written back to your
.test.jsonfiles — next run uses the healed code permanently.
CI/CD tip: Add
npx assuremind apply-healing --yesas a post-test step so healed selectors are committed back automatically. Enablehealing.autoPRin Settings to auto-create a GitHub PR with the fixes.
CI/CD
# GitHub Actions
- name: Run tests
env:
AI_PROVIDER: google
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
GOOGLE_MODEL: gemini-2.5-pro
run: npx assuremind run --all --ciAlso supports GitLab CI and Jenkins — or use the built-in CI Config Generator in Studio (Run Config → Generate CI Config).
Exit code 0 = all passed · 1 = failures.
Documentation
| Resource | Location |
|----------|----------|
| Getting started | docs/GETTING-STARTED.md |
| Studio walkthrough | docs/STUDIO.md |
| CLI reference | docs/CLI-REFERENCE.md |
| Contributing | CONTRIBUTING.md |
| All AI providers | .env.example |
| Built-in docs | Studio → Docs page |
License
MIT — see LICENSE for details.
Built by DVH
