to-ios-test-script
To iOS Test Script
Compose Driver, Override, Expect, and Direct Frida into repeatable tests. Reuse to-ios-probe-script generation rules for actions and observations; compare observations with expectations through the collection's expect. Generate files only; do not connect or execute.
Before generating code
- Call
get_sdk_declarations({"platform":"ios"}). ReadTestand the required SDK APIs; read returnedbridgedeclarations for Objective-C work andgumfor native Frida work. SDK declarations govern API details. - Resolve scenes, targets, and observations from App source. Derive expectations from requirements or confirmed behavior; clarify missing expectations that determine pass or fail.
- Reuse presets: resolve
presets.directoryin.meu/config.json(default.meu/presets), read the iOS entry and relevant featureindex.d.tsdeclarations, and import declared exports from/meu/presets.js.
1. Driver
Drive the App into the target scene and perform the tested interactions, following Driver generation. Default to starting from home; put shared navigation in beforeEach and case-specific actions in test.
Prefer IOS.input with source-resolved accessibility identifiers, await bounded completion waits, and assert input/wait results before continuing. Failure screenshots must preserve the original assertion failure.
2. Override
Temporarily replace Objective-C method behavior or instance ivar values to establish conditions unavailable through normal configuration or Driver actions. Follow Override generation; do not replace the business result being tested.