Record a regression test
Outcome: a saved test folder that reproduces a useful flow and checks its result without a model at replay time.
Before recording
Section titled “Before recording”Use a development app and a known starting state. Choose one behavior: adding a saved item, signing in with a test account, or opening a previously crashing screen. Saving a test normally replays the flow, so it may perform the interaction again.
Record in the viewer
Section titled “Record in the viewer”- Open the app in a compatible Olef device viewer.
- Select Record steps.
- Perform the flow. Use Check for a visible condition that must hold.
- Stop recording and inspect the Steps list.
- Choose Save as test. Review the replay result and saved folder.
- Choose Check it, or ask your agent to run the test repeatedly.
The default recording starts from the current app state. The fresh-start option can clear app data; use it only when that is the intended setup.
Ask your agent
Section titled “Ask your agent”Save the flow I just recorded as packing_list. Review the generatedselectors and assertions, tell me about any low-confidence steps, thenrun it three times. Keep failures visible rather than weakening theexpected behavior to make it pass.Run the saved test
Section titled “Run the saved test”Replace the folder name with the path returned when saving:
olef test run tests/olef/packing_list --repeat 3The folder contains test.sh, recording metadata, and screenshots of the steps. The runner produces JSON, JUnit, and HTML reports. A run that passes only after a retry is classified as flaky.
Record through the CLI
Section titled “Record through the CLI”Within an existing Olef session, you can name steps and save the session’s actions:
olef record step add-item# Perform your app-specific actions and checks here.olef record showolef record save packing_listUse record show to inspect what will be kept before saving. See the full recording guide for session setup, parameters, generated checks, and replay behavior.
Know what the test proves
Section titled “Know what the test proves”A recorded check can prove a visible state at a moment in the flow. It does not automatically prove persistence, backend correctness, or behavior on every Android version. Add those actions and checks explicitly, and run the test in the environments you support.
Next: Run tests in CI.