22 Commits
Author SHA1 Message Date
Davide Depau 948598d92c fix(appium-tests): make sure system dialog taps actually took
A tap that lands while a dialog is still animating in is dropped, and
the click call succeeds either way, so the test walked on believing the
dialog was dismissed. It was not: the recording shows the notification
permission dialog still covering a success screen the test then spent
two minutes failing to find, because a system dialog on top is the only
window in the accessibility tree.

Click these until the dialog is actually gone.
2026-08-16 22:31:18 +02:00
Davide Depau 4c3505039d fix(appium-tests): stop racing the job in the notification tests
Two races, same cause: the tests had to complete a slow detour through
system UI before the job outran them. The banner only exists while the
job runs, and the skip-verification button only during verification, so
on CI the job was often over first.

Give both jobs room to outlast the detour, and drop the skip click from
these two -- they are about the banner, and test_skip_verification
already covers the button, so waiting for success removes the second
race entirely.

Lower the image size cap as well: with seconds-based windows, a fast
host turns a longer window into gigabytes of pointless I/O, while CI
stays far below the cap.
2026-08-16 21:54:48 +02:00
Davide Depau 2605ba04ce fix(appium-tests): re-find the notifications button after the permission dialog
Returning from the system dialog recomposes the banner, so the saved
element reference is stale by the time it is clicked again.
2026-08-16 19:40:54 +02:00
Davide Depau 6d0fa6b0c2 fix(appium-tests): run the write-speed calibration once per session
A fixture imported into two test modules becomes two definitions with
separate caches, so the session-scoped calibration write ran once per
module -- about 70s wasted on CI. Re-export it from conftest instead.
2026-08-16 17:39:39 +02:00
Davide Depau c678633bdd fix(appium-tests): wait for real enumeration and always restore the stick
Poll dumpsys usb after a hot-plug instead of sleeping a fixed 2s: the
framework's view is what the app sees, and a fixed sleep loses the race
on slow hosts, so the flow started while the detach had been processed
but not the attach.

Restore the original drive when a setup or reconnect step fails. A
fixture that fails during setup never runs its teardown, so one failure
left every later test with no USB drive at all.

Also drop the over-sized unplug images: both unplugs happen in
different phases (one during the write, one during verification), so
one window is enough, and the bigger job pushed wait_for_success past
its 120s cap because each resume replays work.
2026-08-16 16:20:07 +02:00
Davide Depau df96ab45fd fix(appium-tests): give the USB permission dialog a real timeout after replug
Re-enumeration and the system permission dialog can lag several
seconds while the guest is under heavy write I/O; the previous 1s
wait made the unplug tests flaky.
2026-08-16 14:35:57 +02:00
Davide Depau 18d09ef762 feat(appium-tests): speed-scale the qemu tests and generate random data on-device
Apply the measured-speed image sizing to the unplug tests, and
replace the fixed 10 MB pushed payload with dd from /dev/urandom on
the device: pushing speed-scaled amounts of data through Appium as
base64 would take longer than the test itself. Written data is now
verified via sha256 instead of a byte-for-byte payload comparison,
and the host-side raw target image is sized to match (sparse: a
zeroed target cannot false-match a random source).
2026-08-16 14:35:37 +02:00
Davide Depau 8a462f377b feat(appium-tests): size test images from a measured write speed
Emulated USB speed varies by orders of magnitude between hosts, and
fixed image sizes made the timing-sensitive tests flaky: on a fast
host the write finished before the harness could click the skip
verification button.

Measure the drive's throughput once per session with a small
app-driven speedtest write, timed from the app's own logcat
timestamps so UI latency cannot skew it, and size each generic test's
image so the write phase lasts TARGET_WRITE_SECONDS (env-tunable).
The calibration flow retries once, absorbing a known first-boot file
picker flake that would otherwise error every test in the session.
2026-08-16 14:35:19 +02:00
Davide Depau b428a492c5 feat(appium-tests): make CI recordings navigable 2026-08-15 22:35:05 +02:00
Davide Depau 39c03ca0b4 appium: Reduce image sizes to speed up tests 2025-04-04 17:54:26 +02:00
Davide Depau 9002df11af appium: Wait longer for selecting first device if using open_file
test_image_too_large sometimes fails when it's not given enough time to
wait to select the USB device.
2025-04-04 17:54:26 +02:00
Davide Depau 9036e0b85f appium: Autogen appropriate test image filenames 2025-04-02 22:16:33 +02:00
Davide Depau c40c899b54 appium: Add resume from notification test 2025-04-02 22:06:34 +02:00
Davide Depau ba5d043a90 appium: Skip verification to speed up tests 2025-04-02 21:32:19 +02:00
Davide Depau 75b337cc16 Fix test_accept_then_deny_notifications test image name 2025-04-02 21:27:54 +02:00
Davide Depau 1caea682df Add notification allow tests 2025-04-02 21:24:01 +02:00
Davide Depau f16df14c04 appium: Make test case recognizable by file name 2025-04-02 21:00:28 +02:00
Davide Depau 10a455108b appium: Add functional QEMU tests 2025-04-02 19:49:39 +02:00
Davide Depau f3ebe52bf7 appium: Add skip verification and large image tests 2025-04-01 22:45:52 +02:00
Davide Depau 755464e8d9 appium: Autostart server 2025-04-01 22:03:52 +02:00
Davide Depau 8bba8fb827 appium: Add qemu remote controller and fixture 2025-04-01 00:25:42 +02:00
Davide Depau 3c772a93df Add initial Appium tests 2025-03-31 00:20:46 +02:00