Build, run & install

Ask an Agent to run your app's tests, follow the run in the chat, read the result and ask for a fix.

Your Agents can run the automated tests in your project and tell you what passed and what failed. You ask in the project’s chat. The Agent runs the tests with the runtest command (see runtest) and reports back in the chat.

Where the tests run depends on your Team:

Team Where the tests run
Cloud Team On a Mac builder in the cloud. Tests of the Android version (beta) run on a Linux builder. Other scripts an Agent runs on a Linux builder use runlinux.
Team on your Mac On that Mac.

A test run doesn’t use your Preview devices, so you won’t see it in Preview. To watch an Agent go through your app on a device instead, ask it to try the app in Preview. See Run your app in Preview.

Ask for a test run

In the project’s chat, ask for the tests, for example:

Run the app's tests and tell me what fails.

To run only some of them, say which, for example “Run only the sign-in tests.”

A project’s tests are listed under test: in its airbuild.yaml file, each under a name. If there are none yet, ask the Agent to write some first, then run them:

Add tests for sign-in and checkout, then run them.

Follow the run

While the tests run, the row above the message box shows what the Agent says it’s doing. See Work with your Agents in chat. If the run is part of a task, the task’s card shows the same. See Follow your Agents’ work with tasks.

With Show What Agents Are Doing, an experimental feature, the Team’s owner can also watch the Agent’s tools and output as they happen. See Watch what an Agent is doing.

A run keeps going until it’s done, even if the Agent is interrupted, and the Agent can pick it up again. To stop it, ask:

Cancel the test run.

Read the result

The Agent tells you in the chat whether the tests passed. The test command doesn’t post a card by itself, but the Agent may send a report card that lists what failed. If you want one, ask for it. See Read a chart or a check report an Agent sends.

Ask for a fix

Reply in the chat, for example:

Fix the two failing tests and run them again.

A failing test can mean the app is wrong or the test is. If you’re not sure which, ask the Agent before it changes either:

Is the app wrong, or is the test out of date?

After a change, the Agent starts a new run. When it builds the app again, you can check the fix in Preview. See Open the Preview when a new build is ready.

Other ways to test

What Where to look
Tests of your app’s Android version (beta) Ask for them the same way, for example “Run the Android tests.” See Make an Android or PocketJS version (beta).
Xcode Cloud workflows with a Test action The project’s Xcode Cloud tab shows each run’s test failures. See Build with Xcode Cloud.
People trying a beta See Share a beta with TestFlight.

Questions

Can several test runs go at once?
In a cloud Team, yes. A Team on your Mac runs one at a time.