We're excited to share that your agent can now write tests for the apps it builds! App testing is rolling out to Retool orgs as a public beta, starting today. If you don't see it yet, never fear: it'll reach your org soon! If you're really eager to get started, comment your Retool domain and we can enable it for you now.
What it does
-
Writes tests as it builds. As you build your app, the agent will write and update tests for it. Tests reflect what your users actually do, like filling in a form or approving an order, and check that those flows still work.
-
Runs them after every change. Related tests run automatically after each change the agent makes. If something breaks, the agent sees the failure and tries to fix it. It should only change a test if you asked for a change that made the test no longer accurate.
-
Never touches your real resources. Tests run against mock data and can't make network requests.
-
Shows everything in one place. The new Tests tab in the debug console lists every test as Passed, Failed, or Not run. Run them all or just a few, filter to failures, or click Fix with AI.
Try it
Testing is disabled by default. Turn on Build with tests in the Chat settings (or on the new Tests tab in the debug console).
The agent will automatically start protecting new behavior with tests. You can also ask it to write tests for your existing app.
Tests are code like the rest of your app, so writing them uses AI credits. Running them doesn't, so you can run tests from the Tests tab as often as you like.
For the full details, check out the testing docs.
Tell us what you think
We're actively shaping the way this feature works, and we'd love to hear your feedback! Let us know on this thread how we can make testing more useful for you. For example:
-
Do the tests cover what you care about, or miss things they should have caught?
-
Did it catch a real problem? Did it fail on something that wasn't an issue, or loosen a test just to get a pass?
