to-android-test-script
To Android Test Script
Compose Driver, Override, Expect, and Direct Frida into repeatable tests. Reuse to-android-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":"android"}). ReadTestand the required SDK APIs; read returnedbridgedeclarations for Java work andgumfor native Frida work. - 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 Android 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 AndroidExp.input, await bounded completion waits, and assert input/wait results before continuing. Failure screenshots must preserve the original assertion failure.
2. Override
Temporarily replace method behavior or field values to establish conditions unavailable through normal configuration or Driver actions. Follow Override generation; do not replace the business result being tested.