Skip to content

Smoke test the iOS Settings app ​

Run a smoke test on the built-in iOS Settings app to confirm a simulator or iPhone is ready.

This example comes from Astra Scout's own sample flows. It runs against the built-in Settings app, so you do not need to install anything on the device. It is a good first flow to confirm that a simulator or iPhone is connected and that Astra Scout can drive it.

The flow ​

yaml
# Device smoke test using the built-in Settings app (no app install needed).
appId: com.apple.Preferences
name: Settings smoke
---
- launchApp:
    stopApp: true
- tapOn: "General"
- assertVisible: "About"
  • appId: com.apple.Preferences targets the Settings app that ships with iOS.
  • launchApp with stopApp: true restarts Settings, so every run starts from the top-level screen.
  • tapOn and assertVisible use visible text. The label General and the row About are stable across recent iOS versions, but the text follows the device language (see Test in different locales).

Make it a reusable smoke suite ​

Once the basic flow works, the pieces from the Flows guides combine into a small suite.

Tag the flow so you can pick it from a whole workspace (see Test discovery and tags):

yaml
appId: com.apple.Preferences
name: Settings smoke
tags:
  - smoke
---
- launchApp:
    stopApp: true
- tapOn: "General"
- assertVisible: "About"

Move the shared opening steps into a subflow and call it from several flows (see Nested flows):

yaml
# subflows/open_general.yaml
appId: com.apple.Preferences
---
- launchApp:
    stopApp: true
- tapOn: "General"
yaml
# about_screen.yaml
appId: com.apple.Preferences
name: Settings - About
tags:
  - smoke
---
- runFlow: subflows/open_general.yaml
- tapOn: "About"
- assertVisible: "Name"

Finally, add a config.yaml that runs only the flows tagged smoke:

yaml
# config.yaml
includeTags:
  - smoke

TIP

By default only the flow files at the top level of the folder are discovered, so the files in subflows/ do not run on their own. They run only when another flow calls them.

  • Quickstart: a walkthrough that uses the same Settings flow.
  • Run flows: run the flow from Astra Scout.