This feature is especially useful when:
- Validating a specific menu.
- Setting your application to a specific state.
- Skipping specific verifications inside your application.
- Preventing specific network requests.
When running inside Waldo, your applicationapplication - An application (sometimes abbreviated to app) is the primary entity in Waldo. It corresponds to a mobile app on either iOS or Android. Typically, an app in Waldo is distributed on the App Store (iOS) or Google Play (Android), or is intended to be so distributed. (Enterprise distribution is not supported.) An application in Waldo is specific to a single OS platform. Therefore, a mobile app that supports both iOS and Android requires two distinct applications in Waldo. is launched with environment variable
INSIDE_WALDO set to the value
When your application detects that this environment variable is set, it can trigger or skip specific logic.
On iOS, you can read the environment variable in Swift like this:
let inWaldo = ProcessInfo.processInfo.environment["INSIDE_WALDO"] == "1"
On Android, you can read the environment variable in Java like this:
boolean inWaldo = "1".equals(System.getProperty("INSIDE_WALDO", "0"));
By determining that your application is running inside Waldo, you can ensure that your tests are deterministic and always replayreplay - A replay is the evaluation of a test in a particular context: A specific device configuration (for example, “iPhone X on iOS 13.5 in French”), a specific application build, or a specific point in time. effectively.
Updated 10 months ago