/lovable:testingfrom lovable
Tests Lovable apps in Preview mode via browser automation. Manages test plans, profiles, and results, keeping them in sync with codebase changes.
Ships in lovable. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill tests Lovable apps in Preview mode - the live, running version of the app - using
browser automation. The canonical workspace is .lovable-agent/tests/; the legacy
.claude/lovable-claude/test/ workspace remains supported and can be migrated with
scripts/migrate-workspace.py.
.lovable-agent/config.json or the legacy CLAUDE.md
(Preview Testing → Status: on)/lovable:test-init - Test wizard (scaffold workspace, create test plans)/lovable:test-run - Execute test plans in Preview mode/lovable:test-sync - Resync test plans with new/changed featurestest_after_implementation: on, run the affected test plans automaticallytest_after_deploy: on, run smoke-level test plans after deploymentLovable Preview is the running app inside the Lovable editor. There are two ways to access it for testing:
If the user is logged in to Lovable in Chrome (Claude in Chrome extension), navigate directly to the Lovable project preview. No token needed.
Lovable exposes a shareable preview URL with an access token:
https://preview--[app-name].lovable.app/?__lovable_token=[JWT]
.lovable-agent/preview-token.local (gitignored); accept the legacy token path during migration.See references/preview-access.md for full procedures: capture, storage, expiry detection, and re-prompting.
In a draft with its own backend, sign in with the draft's demo accounts or the accounts defined in
db/seed.sql; live accounts do not exist there (see ../lovable/references/drafts.md). Since
November 23, 2026 Lovable can create a temporary test user: sign-in only on the built-in backend,
approved each time in the project's chat, and removed at the end of the response. Never select
"Always allow" for it without the user's OK.
All testing artifacts live in a standardized folder in the user's project:
.lovable-agent/
├── config.json
├── context.md
├── preview-token.local # Preview token ONLY - gitignored
└── tests/
├── README.md
├── plans/
├── profiles/
└── results/
The legacy alias remains readable:
.claude/lovable-claude/test/
├── README.md # Explains the workspace (generated)
├── test-config.json # Preview URL (no token), settings, coverage state
├── preview-token.local # Preview token ONLY - gitignored, 7-day validity
├── plans/ # Test plans (one file per plan)
│ ├── TP-001-user-signup.md
│ ├── TP-002-create-project.md
│ └── ...
├── profiles/ # Test user profiles (test accounts, personas, data)
│ ├── default.json
│ └── admin.json
└── results/ # Test run results (one file per run)
└── 2026-06-10-TP-001.md
See references/test-plan-format.md for the standardized formats of every file type.
/lovable:test-init)Guided creation of the test workspace:
.lovable-agent/tests/ and .lovable-agent/config.json structure.lovable-agent/config.json under testingSee references/test-wizard.md for the complete wizard procedure.
/lovable:test-run)Execute test plans against the Preview app via browser automation:
results/ and report a summaryModes:
--all: run every test plan (planned end-to-end run)--changed: run only plans affected by recent changes (after each implementation)--smoke: run only plans tagged smoke[plan-id]: run one specific planSee references/test-execution.md for browser automation workflows.
/lovable:test-sync)Keep tests in sync with the codebase as features are added:
testing.last_synced_commit in .lovable-agent/config.json.lovable-agent/config.json with the new testing sync pointWhen preview testing is enabled and Claude implements a new feature in the project:
test_after_implementation: on → run the affected test plans in Preview immediatelytest_after_implementation: off → remind the user: "New feature lacks a test plan - run /lovable:test-sync to update coverage"This keeps the test suite alive instead of letting it rot.
The skill reads these fields from the user's CLAUDE.md:
## Preview Testing Configuration
- **Status**: on
- **Preview URL**: https://preview--my-app.lovable.app
- **Access Method**: token # token | browser-login
- **Token Captured**: 2026-06-10 (valid ~7 days)
- **Test After Implementation**: on # run affected plans after each feature
- **Test After Deploy**: smoke # off | smoke | all - run after yolo auto-deploy
- **Last Test Sync**: [commit hash]
Configuration options:
token (tokenized preview URL) or browser-login (user logged in to Lovable)off, smoke, or all)The actual token is NEVER in AGENTS.md, CLAUDE.md, or config JSON - only in the ignored
.lovable-agent/preview-token.local.
When both yolo mode and preview testing are enabled, the post-deploy verification gains a fourth level:
smoke (or all) test plans against the Preview app per Test After Deploy settingAfter auto-push of frontend changes (which sync to Lovable in 1-2 minutes), wait for sync before running preview tests so the Preview reflects the pushed code. See references/test-execution.md → "Sync wait".
/lovable:init asks about preview testing (Question 8.7) and can capture the preview URL/token during setup, then offers to run /lovable:test-init to build the initial test plans.
Golden rule: never block the user. Every automation failure has a manual fallback.
Token expired:
🔑 Preview token expired (captured [date], valid 7 days)
To capture a fresh one:
1. Open your Lovable project in preview mode
2. Click the arrow icon at the top, next to the address bar
3. Copy the URL from the new tab (contains ?__lovable_token=...)
4. Paste it here
Or log in to Lovable in Chrome and I'll use your session instead.
Browser automation unavailable:
❌ Browser automation unavailable (Claude in Chrome extension required)
Manual test checklist for [plan-id]:
[numbered steps + expected results from the plan]
Report results back and I'll record them in results/.
Preview app shows error / blank page:
Test failure:
references/preview-access.md - Capturing, storing, and validating preview URLs and tokens; access priority; expiry handlingreferences/test-plan-format.md - Standardized formats for test plans, profiles, config, results, and the workspace READMEreferences/test-wizard.md - Codebase scanning for main user actions; guided question flow; plan generationreferences/test-execution.md - Browser automation workflows for executing plans in Preview; verification; results reportingThis skill closes the loop: code → push → deploy → test in the real running app → fix → repeat.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
lovable, preview-testing, browser-automation, test-plans, e2e-testing
npx claudepluginhub 10k-digital/lovable-agent-skills --plugin lovable9 skills in this plugin
/initInitialize or reinitialize a Lovable project for coding agents. Create or refresh .lovable-agent configuration and context, AGENTS.md, and the Claude compatibility shim while preserving project settings, custom instructions, tests, and local credentials./lovableIntegration skill for Lovable.dev projects. Activates when working with:
- Lovable.dev projects with GitHub sync
- Supabase Edge Functions that need deployment
- Database migrations for Lovable Cloud
- Projects with supabase/ directory structure
- Any mention of "Lovable", "deploy edge function", "apply migration"
- Lovable drafts (creating, reviewing, accepting, or rejecting a draft)
Provides exact Lovable prompts for backend operations that can't be done via GitHub alone.
/Other plugins' skills for the same job