TestDriver Assert
Reference for testdriver.assert(), which uses AI to verify screen state from plain-English statements.
Dev & CodingIntermediate★ 239⑂ 35AI score 6/10Last updated: Aug 16, 2026
What it does
A reference skill that teaches Claude to use TestDriver's assert() correctly.
- Documents the syntax and options for natural-language screen assertions such as
await testdriver.assert('the login page is displayed'), including AI sampling controls (temperature,top.p,top.k). - Provides best practices for reliable assertions: be specific, assert state before and after an action, and combine with framework assertions like
expect(). - Ships a polling helper pattern (
waitForAssertion) for conditions that take time, plus a full vitest example.
Who it's for
- QA engineers and developers writing TestDriver E2E tests for web or desktop apps
- Teams tired of brittle selector-based tests who want semantic/visual verification
- Anyone letting Claude Code generate TestDriver test suites
Examples
- Form validation: submit an empty form, then
assert('email field shows "required" error'). - Navigation: after clicking login,
waitForAssertion(testdriver, 'user dashboard is displayed', 10000)to wait for load. - Multi-step wizard: verify progress with
assert('step 2 is active')andassert('step 1 is completed').
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/testdriverai/testdriverai/HEAD/ai/skills/testdriver-assert/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the ai/skills/testdriver-assert folder from the GitHub repo testdriverai/testdriverai into my ~/.claude/skills/testdriver-assert/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/testdriverai/testdriverai.git /tmp/testdriverai && mkdir -p ~/.claude/skills/testdriver-assert && cp -r /tmp/testdriverai/ai/skills/testdriver-assert/* ~/.claude/skills/testdriver-assert/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo:
git clone https://github.com/testdriverai/testdriverai.git /tmp/testdriverai - Create the skill folder:
mkdir -p ~/.claude/skills/testdriver-assert - Copy the files:
cp -r /tmp/testdriverai/ai/skills/testdriver-assert/* ~/.claude/skills/testdriver-assert/ - Install the SDK in your project:
npm i testdriverai - Set the
TD_API_KEYenvironment variable with your TestDriver API key. - Restart Claude Code and ask something like "Write a login-flow test using testdriver.assert".