Testing UI without model calls on every run
Danwo is an open-source end-to-end testing framework for web and mobile applications. It drives your app through its UI like a user and records what happens behind the scenes. When you need to verify what occurred, the framework makes that information available.
Tests are written as plain-English agent steps. The first run sends each step to a model, which works out the clicks and interactions. Danwo records the resulting actions. Later runs replay that recording with no model call. This means test speed does not degrade as the suite grows. The command danwo test --replay-only ensures no model is invoked during CI runs. A step returns to the model only when the page has changed enough that the existing recording no longer fits.
Backend emulation and fault injection
When an app handles payments, email, or webhooks, danwo adds a backend layer. Emulated providers answer from local proxies: Stripe, Clerk, Resend, Google, Slack and 20 more. No sandbox keys are required, and no code changes to your app are needed. Invariants read your database and the provider after the test checks a single row, one charge, one email sent. The fault matrix reruns a test once per fault: 500 errors, declined payments, duplicate webhooks, lost database commits. The invariant judges each run, making it clear which condition broke the test.
Recording and replay for CI stability
The first run of a test requires a model and its API key. Each step goes to the model, which determines the clicks, and danwo records the result. Later runs replay from the recording with no model call. Committing the recording and running CI replay ensures the test remains deterministic. Every run, with or without the backend layer, leaves a flight record: video, steps, and the calls behind them. These appear in a dashboard, as a PR comment, and over MCP. No real keys are on disk. Clone the repository, install dependencies, and run the tests.
Getting started
You need Node.js 22.22.3 or a later 22 release, or 24.11.1 or newer. The framework runs on macOS, Linux, or Windows for web tests; mobile tests require macOS or Linux. In your app's folder:
npx @danwo/cli initThe init command asks what to test, which model and providers to use (pick none for a UI-only start), and which coding agents to set up. It writes a config and a first test that passes, and installs the browser. Then:
npm run test:danwoPlatform support
- Web apps: any framework, started by danwo or already running.
- Android: Expo, React Native, Jetpack Compose and Views apps on an emulator.
- iOS: Expo, React Native, SwiftUI and UIKit apps on an iOS Simulator.
- Playwright Test: keep your existing tests, add emulators and the fault matrix.
- From Cypress: move a suite over one spec at a time.
- From Detox: move a Detox suite over one test file at a time.
Example stacks and built-in examples
The project includes example directories that demonstrate full-stack testing. The commerce example is a shop on Next.js, Hono, Postgres and Stripe Checkout holding 86 faults. The saas example covers workspaces, a trial and billing, Slack and Google, Inngest jobs and live notes. Other examples include clerk-login (real Clerk components with Google sign-in and org invites on the emulator), better-auth (self-hosted Better Auth with email codes, Google and GitHub linked accounts), with-next (smallest waitlist on Postgres and Resend), and mobile adaptations with-swiftui, with-compose, and with-flutter. More galleries are available in the examples directory.
Backend invariants and provider emulation
| Emulates the providers | Stripe, Clerk, Resend, Google, Slack and 20 more answer from local emulators behind a proxy. No sandbox keys, no code changes. |
| Judges the backend | An invariant reads your database and the provider after the test: one row, one charge, one email. |
| Breaks it on purpose | danwo matrix reruns a test once per fault: 500s, declines, duplicate webhooks, lost database commits. The invariant judges each run. |
Dánwò and licensing
Dánwò is Yorùbá for "to test." It comes from dán … wò, "try it and see": you put something to the test and watch what happens. Say it DAHN-woh, high then low. The code is under the Apache License 2.0. The dánwò name and logo are trademarks of Carbonme Inc; see TRADEMARKS.md.