Repository navigation
v0.7: exact per-test reporting, element screenshots, iOS goBack, faster polling - #11
Merged
Merged
Conversation
…iOS fill fix
- screenshot({ clip, scale }): crop to the element (points -> pixels via the
screen scale) and downscale, with a dependency-free PNG transform. Falls
back to the full screen for PNG formats Appium does not produce.
- pressButton('BACK') on iOS: left-edge swipe instead of throwing.
- snapshotTuning option: waitForIdleTimeout 0 (+ animationCoolOffTimeout 0 on
iOS) via /appium/settings once per session. Measured on production:
fill+assert 7.3s -> 3.5s on an Android emulator, 3.4s -> 2.95s on an iOS
simulator.
- visibility: 'bounds' option for mobilecli-like isVisible.
- iOS clearText/fill: clear through GET /element/active + element clear.
XCUITest's source has no focused attribute and RN fields put the caret at
the start, so the backspace path never cleared anything.
connect()/disconnect() run inside the test (the device fixture is
test-scoped), so the driver reads Playwright's test.info() from the user's own
@playwright/test copy instead of reconstructing test<->session links from
wall-clock intervals afterwards.
- connect(): add a TestingBot session link annotation to the Playwright
report; in sessionPerTest mode name the session after the test
("describe › title (retry N)") and correct the fixture's device.model /
device.osVersion annotations for rotated sessions.
- disconnect(): record the attempt's outcome in the run log; in
sessionPerTest mode push the verdict while the session is still alive.
- observer: sessions whose every span carries an outcome get an exact name
and verdict (pooled sessions fail if any attempt on them failed); the
timing heuristic remains the fallback when test.info() is unavailable.
Verified on production: per-test sessions named and judged correctly
including retries, pooled session reports "1 of 2 tests failed".
mobilewright's pool re-queues a NoDeviceAvailableError and only retries when one of its own slots is released, so with an empty pool a fast hub rejection (capacity, pinned device busy, plan limit) idled the test until its allocation timeout. allocate() now retries with exponential backoff (allocationRetryDelay, default 5s, capped at 30s) until the pool's signal aborts; with a session held it still hands the error back to the pool.
e2e/live.config.ts runs against TestingBot's public sample app (no local builds): hierarchy timing, fill + sum, element screenshots, iOS goBack in Settings, and per-test reporting, with env toggles for sessionPerTest, forced failures, retries, visibility and snapshot tuning. README: exact reporting, new options, iOS BACK and element screenshots, and the mixed-platform pool caveat. CHANGELOG: 0.7.0 (unreleased).
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.
Brings the driver to parity with (and past) the Sauce Labs and TestMu.Ai mobilewright drivers. Every change was verified on TestingBot production using the new
e2e/live.config.tssuite.Changes
connect()/disconnect()run inside the test, so the driver reads Playwright'stest.info()there instead of matching tests to sessions by timestamps afterwards.sessionPerTest: each session is nameddescribe › title (retry N)when it starts, and its verdict is reported when the test ends.device.model/device.osVersionannotations.locator.screenshot()is cropped to the element andscreenshot({ scale })downscales, using a dependency-free PNG crop/scale (src/png.ts).screen.goBack()on iOS performs the system left-edge back swipe instead of throwing.snapshotTuning(on by default) setswaitForIdleTimeout: 0, plusanimationCoolOffTimeout: 0on iOS, once per session.visibility: 'bounds'option: elements count as visible based on their frame size, like local mobilecli.allocationRetryDelay: "no device available" is retried with backoff while the run holds no session. mobilewright's pool only retries when one of its own slots is released.fill()/clearText()clear the focused field throughGET /element/active+ element clear. Previouslyfill('7')on a field holding0gave70.Verified on production
sessionPerTest, forced failure, retry)(retry 1)); correct verdicts with Playwright's error messages1 of 2 tests failed. reporting › fails on purpose: ExpectError …goBack()Unit/integration tests: 158 passing against protocol 0.0.53 and 0.0.68.
Known upstream (mobilewright 0.0.68) limitations, documented in the README
--projectinvocation.getText(): returnstext ?? label ?? value, so a labelled iOS text field reports its label. UsetoHaveValue.CHANGELOG has the 0.7.0 entry (unreleased).