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
# 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.Preferencestargets the Settings app that ships with iOS.launchAppwithstopApp: truerestarts Settings, so every run starts from the top-level screen.tapOnandassertVisibleuse visible text. The labelGeneraland the rowAboutare 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):
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):
# subflows/open_general.yaml
appId: com.apple.Preferences
---
- launchApp:
stopApp: true
- tapOn: "General"# 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:
# config.yaml
includeTags:
- smokeTIP
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.
Related content
- Quickstart: a walkthrough that uses the same Settings flow.
- Run flows: run the flow from Astra Scout.
