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 application 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 replay effectively.
Updated over 1 year ago