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 iOS device is ready.

A smoke test is a short test that checks only whether the most basic things work. This example is one of Astra Scout's own sample flows. It runs on the iOS Settings app that comes with the device, so nothing needs installing. Run it first to confirm that a simulator or iOS device is connected and that Astra Scout can control 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 is the Settings app that comes with iOS.
  • launchApp with stopApp: true closes and reopens Settings, so every run starts from the main Settings screen.
  • tapOn and assertVisible find elements by visible text. The text General and About stays the same across recent iOS versions, but it changes with the device language (see Test in different locales).

Make it a reusable smoke suite ​

Once the basic flow works, you can combine features from the Flows guides into a small suite.

First, 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"

Next, 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 so that only flows with the smoke tag run:

yaml
# config.yaml
includeTags:
  - smoke

TIP

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

  • Quickstart: a step-by-step guide that uses the same Settings flow.
  • Run flows: run the flow from Astra Scout.