Add mobile replay harness#60
Open
maciejfs wants to merge 2 commits into
Open
Conversation
Generic harness for driving any iOS app through Lidar live tools or Appium, then validating the matching FullStory replay. Navigation, target screen, scroll counts, and replay heuristics all come from a goal JSON manifest. No app-specific defaults in committed code. Scripts: run-lidar-live-ios, run-goal, run-local-lidar-ios, validate-goal-artifacts, validate-replay-observations, fetch-subtext-review-evidence, capture-subtext-review-observations, capture-replay-observations-from-snapshot, prepare-subtext-review.
77b1926 to
dad1627
Compare
Adds extract-session-url.mjs. It opens an Appium session, pulls the iOS NSUserDefaults plist for the target bundle, reads the FullStory previous-session and previous-user IDs, and writes the replay URL to fullstory-session-url.txt. The local Lidar runner now calls this when the goal finishes so the validate-* and Subtext review scripts have a real session URL to work with. No app code changes needed for any customer. The runner also calls mobile: terminateApp before each run so the SDK starts a fresh FullStory session instead of reusing the previous one. The replay URL uses MOBILE_FULLSTORY_APP_HOST so staging and EU orgs land on the right host. README and mobile.env.example are updated to match, including a note that this is iOS only for now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
scripts/mobile/: a set of Node scripts that drive any iOS app on a physical device and then check whether the FS replay looks right.How it works
You write a goal JSON file that describes what screen to navigate to, what taps to perform, and what the replay should contain. The runner reads that file plus env config, connects to the device through Lidar live tools (or Appium directly), drives the goal, and writes snapshots and a report. Separate scripts then fetch the FS replay, pull out observations, and validate them against the goal.
Nothing is hardcoded for any particular app. All app-specific config comes from the goal JSON and
.env.local.What's in here
run-lidar-live-ios.mjs: drives the app through Lidar MCP live toolsrun-goal.mjs: drives the app through Appium/WebDriverIOrun-local-lidar-ios.mjs: builds and starts a local Lidar from your mn checkout, starts Appium, runs the goal, and writes the FS replay URL when the run finishesextract-session-url.mjs: pulls the iOS NSUserDefaults plist through Appium and writes the FS replay URL (used by the runner above, also runnable on its own)validate-goal-artifacts.mjs: checks device artifacts match the goalfetch-subtext-review-evidence.mjs: fetches replay evidence from Subtext MCPcapture-subtext-review-observations.mjs: extracts structured observations from replay evidencevalidate-replay-observations.mjs: compares observations to goal expectationsgoals/example.json: documented goal skeleton you copy and edit for your appappium-layer.mjs,device-e2e-common.mjs: shared Appium/device plumbingHow to test
scripts/mobile/mobile.env.exampletoscripts/mobile/.env.localand fill in your values.That builds Lidar, starts Appium, connects to the device, runs the goal, and writes output to
tmp/. Takes about 3 minutes.For a remote Lidar server, set
LIDAR_IOS_MCP_URLand runnode scripts/mobile/run-lidar-live-ios.mjs.See
README.mdinscripts/mobile/for the full details.Example .env.local (for internal FullStoryTestingApp testing)
The
images.jsongoal file is not committed (gitignored), but you can create one by copyinggoals/example.jsonand filling in the navigation steps for the Images screen in FullStoryTestingApp.MOBILE_FULLSTORY_APP_HOSTis only needed for non-prod orgs (staging or EU). It defaults tohttps://app.fullstory.com.Related
Lidar iOS live tool support: https://github.com/cowpaths/mn/pull/104208