Skip to content

Commit 9dd6c56

Browse files
committed
test: trim replay benchmark script comments
1 parent e7b9520 commit 9dd6c56

10 files changed

Lines changed: 10 additions & 89 deletions
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,30 @@
1-
# Deep multi-level navigation with assertions at each level.
2-
# Tests: open, appstate, snapshot (-i and plain), screenshot, click, wait, is (exists/visible),
3-
# find (text exists), back.
4-
# Note: Uses broad || selectors for Android version resilience (API 33-35).
1+
# Deep navigation.
52
context platform=android timeout=60000 retries=2
63

74
open settings --relaunch
85
appstate
96
snapshot -i
107
screenshot "./test/screenshots/replays/android-deep-nav-root.png"
118

12-
# --- Level 0: Settings root ---
139
is exists "label=System || label=\"About phone\" || label=\"About emulated device\" || label=Display || label=Battery || label=Apps"
1410

15-
# --- Level 1: Navigate to System ---
1611
click "label=System"
1712
wait "label=Languages || label=\"Languages & input\" || label=Gestures || label=\"Date & time\" || label=\"System update\" || label=\"Reset options\"" 5000
1813
snapshot -i
1914
is exists "label=Languages || label=\"Languages & input\" || label=Gestures || label=\"Date & time\""
2015
find text "Languages" exists
2116

22-
# --- Level 2: Navigate to About ---
2317
click "label=\"About phone\" || label=\"About emulated device\" || label=\"About device\""
2418
wait "label=\"Device name\" || label=\"Phone number\" || label=\"Android version\" || label=\"Model\"" 5000
2519
snapshot -i
2620
screenshot "./test/screenshots/replays/android-deep-nav-about.png"
2721
is exists "label=\"Device name\" || label=\"Android version\" || label=\"Model\" || label=\"Model name\""
2822

29-
# --- Back to Level 1 ---
3023
back
3124
wait "label=Languages || label=\"Languages & input\" || label=\"Date & time\"" 3000
3225
snapshot
3326
is exists "label=Languages || label=\"Languages & input\" || label=\"Date & time\""
3427

35-
# --- Back to Level 0 ---
3628
back
3729
wait "label=System || label=Display || label=Battery" 3000
3830
is exists "label=System || label=Display || label=Battery"
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,24 @@
1-
# Scroll through Settings to discover items below the fold.
2-
# Tests: open, snapshot -i, scroll (direction + amount), scrollintoview, find (text exists),
3-
# is exists, screenshot.
4-
# Note: Android Settings item order varies by API level; selectors use broad || fallbacks.
1+
# Scroll discovery.
52
context platform=android timeout=60000 retries=2
63

74
open settings --relaunch
85
snapshot -i
96
screenshot "./test/screenshots/replays/android-scroll-top.png"
107

11-
# Verify items visible at top
128
is exists "label=\"Network & internet\" || label=\"Network and internet\" || label=\"Connected devices\" || label=Apps || label=Notifications"
139

14-
# Scroll down to find items further in the list
1510
scroll down 3
1611
snapshot -i
1712

18-
# Use scrollintoview to find System (typically near the bottom)
1913
scrollintoview "System" --max-scrolls 10
2014
snapshot -i
2115
is exists "label=System"
2216
find text "System" exists
2317

24-
# Scroll back up to the top
2518
scroll up 8
2619
snapshot -i
2720
is exists "label=\"Network & internet\" || label=\"Network and internet\" || label=Apps || label=Notifications"
2821

29-
# Use scrollintoview for another target below the fold
3022
scrollintoview "Accessibility" --max-scrolls 10
3123
is exists "label=Accessibility"
3224
screenshot "./test/screenshots/replays/android-scroll-found.png"

test/benchmarks/replays/android/04-text-input-keyboard.ad

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,27 @@
1-
# Text entry into the Settings search and keyboard management.
2-
# Tests: open, snapshot -i, click, type, keyboard (status, dismiss), wait, is exists,
3-
# find, back, screenshot.
4-
# Note: keyboard status and keyboard get are Android-only features.
1+
# Text input.
52
context platform=android timeout=60000 retries=2
63

74
open settings --relaunch
85
snapshot -i
96

10-
# Tap the search field / search icon at the top of Settings
117
click "label=\"Search settings\" || label=Search"
128
wait 1000
139
snapshot -i
1410

15-
# Check keyboard appeared
1611
keyboard status
1712

18-
# Type a search query
1913
type "Display"
2014
wait "label=Display" 3000
2115
snapshot -i
2216

23-
# Verify search results
2417
is exists "label=Display"
2518
find text "Display" exists
2619
screenshot "./test/screenshots/replays/android-search-results.png"
2720

28-
# Dismiss the keyboard
2921
keyboard dismiss
3022
keyboard status
3123
snapshot -i
3224

33-
# Navigate back out of search
3425
back
3526
wait "label=Display || label=Battery || label=Apps || label=\"Network & internet\" || label=\"Network and internet\"" 5000
3627
snapshot -i
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
# App lifecycle: open, navigate, home, reopen, verify state preservation.
2-
# Tests: open (--relaunch and plain), appstate, snapshot (-i and plain), home,
3-
# is exists, screenshot, back, wait.
1+
# App lifecycle.
42
context platform=android timeout=60000 retries=2
53

6-
# --- Open and navigate into a sub-screen ---
74
open settings --relaunch
85
appstate
96
snapshot -i
@@ -14,20 +11,16 @@ wait "label=Brightness || label=\"Brightness level\" || label=\"Dark theme\" ||
1411
snapshot -i
1512
is exists "label=Brightness || label=\"Brightness level\" || label=\"Dark theme\" || label=\"Screen timeout\" || label=\"Font size\""
1613

17-
# --- Go home ---
1814
home
1915
wait 2000
2016

21-
# --- Reopen the app (without --relaunch to preserve state) ---
2217
open settings
2318
wait "label=Brightness || label=\"Brightness level\" || label=\"Dark theme\" || label=Display || label=Battery || label=Apps" 5000
2419
appstate
2520
snapshot -i
2621
screenshot "./test/screenshots/replays/android-lifecycle-reopen.png"
2722

28-
# State should be preserved or we land at root -- either is acceptable
2923
is exists "label=Brightness || label=\"Brightness level\" || label=\"Dark theme\" || label=Display || label=Battery || label=Apps"
3024

31-
# Navigate back to root
3225
back
3326
wait "label=Display || label=Battery || label=Apps" 3000

test/benchmarks/replays/android/06-swipe-gestures.ad

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,36 @@
1-
# Swipe and gesture-based interactions.
2-
# Tests: open, snapshot -i, swipe (with duration, count, pattern), scroll (direction + amount),
3-
# back, wait, is exists, click, screenshot.
4-
# Note: Coordinates target Pixel 7 emulator (~411x914 logical dp).
1+
# Swipe gestures.
52
context platform=android timeout=60000 retries=2
63

74
open settings --relaunch
85
snapshot -i
96
is exists "label=Display || label=Battery || label=Apps || label=\"Network & internet\" || label=\"Network and internet\""
107

11-
# --- Swipe-scroll down through the Settings list ---
12-
# Swipe from lower-center to upper-center to scroll down
138
swipe 206 700 206 250 300
149
wait 500
1510
snapshot -i
1611

17-
# Swipe with repeat count
1812
swipe 206 650 206 300 300 --count 2 --pause-ms 200 --pattern one-way
1913
wait 500
2014
snapshot -i
2115

22-
# --- Scroll back to top using scroll command ---
2316
scroll up 5
2417
wait 500
2518
snapshot -i
2619
is exists "label=\"Network & internet\" || label=\"Network and internet\" || label=Apps || label=Notifications || label=\"Connected devices\""
2720

28-
# --- Navigate into Display for gesture-based back ---
2921
click "label=Display"
3022
wait "label=Brightness || label=\"Brightness level\" || label=\"Dark theme\" || label=\"Screen timeout\"" 5000
3123
is exists "label=Brightness || label=\"Brightness level\" || label=\"Dark theme\" || label=\"Screen timeout\""
3224
screenshot "./test/screenshots/replays/android-swipe-before-back.png"
3325

34-
# --- Swipe from left edge for back gesture ---
3526
swipe 10 450 300 450 300
3627
wait "label=Display || label=Battery || label=Apps" 3000
3728
snapshot -i
3829
is exists "label=Display || label=Battery || label=Apps"
3930

40-
# --- Navigate in again and scroll within sub-screen ---
4131
click "label=Display"
4232
wait "label=Brightness || label=\"Brightness level\" || label=\"Dark theme\" || label=\"Screen timeout\"" 5000
4333

44-
# Scroll down inside Display settings
4534
scroll down 2
4635
snapshot -i
4736
screenshot "./test/screenshots/replays/android-swipe-scroll.png"
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,32 @@
1-
# Deep multi-level navigation with assertions at each level.
2-
# Tests: open, appstate, snapshot (-i and plain), screenshot, click, wait, is (exists/visible),
3-
# find (text exists), get (text), back -- all combined in a single flow.
1+
# Deep navigation.
42
context platform=ios timeout=60000 retries=2
53

64
open com.apple.Preferences --relaunch
75
appstate
86
snapshot -i
97
screenshot "./test/screenshots/replays/ios-deep-nav-root.png"
108

11-
# --- Level 0: Settings root ---
129
is exists "role=cell label=General"
1310
find text "General" exists
1411

15-
# --- Level 1: General ---
1612
click "role=cell label=General"
1713
wait "label=About || label=\"Software Update\"" 5000
1814
snapshot -i
1915
is exists "label=About"
2016
find text "About" exists
2117

22-
# --- Level 2: About ---
2318
click "label=About || role=cell label=About || role=button label=About"
2419
wait "label=\"Model Name\" || label=Name || label=\"Software Version\" || label=\"Model Number\" || label=\"Serial Number\"" 5000
2520
snapshot -i
2621
screenshot "./test/screenshots/replays/ios-deep-nav-about.png"
2722
is exists "label=\"Model Name\" || label=Name || label=\"Software Version\" || label=\"Model Number\""
2823

29-
# --- Back to Level 1 ---
3024
back
3125
wait "label=About" 3000
3226
snapshot
3327
is exists "label=About"
3428
is exists "label=\"Software Update\" || label=\"Date & Time\" || label=Keyboard"
3529

36-
# --- Back to Level 0 ---
3730
back
3831
wait "role=cell label=General" 3000
3932
is exists "role=cell label=General"

test/benchmarks/replays/ios/simulator/03-scroll-discovery.ad

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,23 @@
1-
# Scroll through Settings to discover items below the fold.
2-
# Tests: open, snapshot -i, scroll (direction + amount), find (text exists),
3-
# is exists, wait, screenshot.
1+
# Scroll discovery.
42
context platform=ios timeout=60000 retries=2
53

64
open com.apple.Preferences --relaunch
75
snapshot -i
86
screenshot "./test/screenshots/replays/ios-scroll-top.png"
97

10-
# Verify top-level items visible without scrolling
118
is exists "role=cell label=General"
129

13-
# Scroll down to find items further in the list
1410
scroll down 3
1511
snapshot -i
1612

17-
# Verify we discovered a lower item after scrolling.
18-
# Accessibility is typically below the fold on the iPhone simulator.
1913
snapshot -i
2014
is exists "label=Accessibility || label=Apps"
2115
find text "Accessibility" exists
2216

23-
# Scroll back up to verify we can return to the top
2417
scroll up 5
2518
snapshot -i
2619
is exists "role=cell label=General"
2720

28-
# Scroll down again and confirm we can rediscover the lower item.
2921
scroll down 3
3022
snapshot -i
3123
is exists "label=Accessibility || label=Apps"
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
1-
# Text entry into the Settings search field.
2-
# Tests: open, snapshot -i, click, type, wait, is exists, find, screenshot.
1+
# Text input.
32
context platform=ios timeout=60000 retries=2
43

54
open com.apple.Preferences --relaunch
65
snapshot -i
76

8-
# Tap the search field at the top of Settings
97
click "role=searchField || label=Search || label=\"Search\""
108
wait 1000
119
snapshot -i
1210

13-
# Type a search query
1411
type "General"
1512
wait "label=General" 3000
1613
snapshot -i
1714

18-
# Verify search results appeared
1915
is exists "label=General"
2016
find text "General" exists
2117

22-
# Capture the populated search results
2318
screenshot "./test/screenshots/replays/ios-search-results.png"
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
# App lifecycle: open, navigate, home, reopen, verify state preservation.
2-
# Tests: open, appstate, snapshot (-i and plain), home, is exists, screenshot,
3-
# back, wait, find.
1+
# App lifecycle.
42
context platform=ios timeout=60000 retries=2
53

6-
# --- Open and navigate into a sub-screen ---
74
open com.apple.Preferences --relaunch
85
appstate
96
snapshot -i
@@ -13,21 +10,16 @@ wait "label=About || label=\"Software Update\"" 5000
1310
snapshot -i
1411
is exists "label=About"
1512

16-
# --- Go home ---
1713
home
1814
wait 2000
1915

20-
# --- Reopen the app and check state ---
2116
open com.apple.Preferences
2217
wait "label=About || label=\"Software Update\" || role=cell label=General" 5000
2318
appstate
2419
snapshot -i
2520
screenshot "./test/screenshots/replays/ios-lifecycle-reopen.png"
2621

27-
# State should be preserved -- we should still be in General (or at root).
28-
# On iOS, backgrounded apps typically preserve navigation state.
2922
is exists "label=About || label=\"Software Update\" || role=cell label=General"
3023

31-
# Navigate back to root to leave clean state
3224
back
3325
wait "role=cell label=General" 3000
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
1-
# Swipe and gesture-based interactions.
2-
# Tests: open, snapshot -i, swipe (with duration, count, pattern), wait, is exists, longpress,
3-
# screenshot.
4-
# Note: Coordinates target iPhone 17 Pro simulator (393x852 logical points).
1+
# Swipe gestures.
52
context platform=ios timeout=60000 retries=2
63

74
open com.apple.Preferences --relaunch
85
snapshot -i
96
is exists "role=cell label=General"
107

11-
# --- Swipe-scroll down through the Settings list ---
12-
# Swipe from lower-center to upper-center to scroll down
138
swipe 197 650 197 300 300
149
wait 500
1510
snapshot -i
1611

17-
# Swipe again with repeat count and ping-pong pattern
1812
swipe 197 600 197 350 300 --count 2 --pause-ms 200 --pattern one-way
1913
wait 500
2014
snapshot -i
2115

22-
# Verify a lower section entered view after the gesture sequence.
2316
is exists "label=Accessibility || label=Apps"
2417
screenshot "./test/screenshots/replays/ios-swipe-before-back.png"
2518

26-
# Longpress on a list item (center of screen area)
2719
longpress 197 400 800
2820
snapshot -i
2921
screenshot "./test/screenshots/replays/ios-swipe-longpress.png"

0 commit comments

Comments
 (0)