JsonUI
← ReferenceTest tooling referenceTwo tables that answer 'does this feature work on my platform?' and 'which repo owns this?'. The feature support matrix lists where the three drivers agree and where they differ; the ownership table names the single source of truth for each moving part of the test toolchain.reference
Feature support matrixThe action / assert DSL is cross-platform: the core actions, all assertions (with auto-wait), `state` assertions read from the state bridge, and the `screenshot` visual-regression assert run on all three drivers. The rows below are where the drivers genuinely differ — verified against the driver source, not the READMEs.Where the drivers differ (source-verified):
support matrix
Feature | iOS | Android | Web
------------------------------+-------------------------------+---------------------------+------------------------
element id -> automation id | accessibilityIdentifier | resource-id (testTag) | HTML id (#id)
screen marker (assert screen) | 0.5x0.5 centred overlay | 1.dp Box, inset past bars | data-screen on the root
marker build gate | #if DEBUG, or flag [fn4] | debuggable, or flag [fn4] | NODE_ENV != production
"is displayed" predicate | >= 1pt in viewport [fn5] | findObject(By.res(...)) | >= 1px in viewport [fn5]
pass / fail accessor | result.allPassed | TestSuiteResult.allPassed | allPassed(result) [fn]
addMedia action | PhotoKit seed (sim only) | into the gallery | sets a file input
emitHook action | no-op + warning | no-op + warning | app-registered hooks
initialState delivery | launch env | intent extra | sessionStorage
state bridge read by `state` | leaf __state_<screenId> | JsonUIState on the marker | window.__JSONUI_STATE__
openedUrl assertion | not supported | not supported | window.open spy
tap.retryTapIfNoChange | applied | applied | accepted, no-op
recordings | Xcode auto (failures) | record=true, per case | Playwright video config
launch.permissions | UI-interruption monitor | grant / deny->assert [fn3]| storage + cookies
launch.clearState | clear-state env | in-process wipe [fn2] | cookies + storage
run the tests with | xcodebuild test | gradlew connectedAndroid | npx playwright test
 
[fn] a function the Web driver exports; iOS and Android read allPassed as a property on the result object
[fn2] wipes files, shared_prefs, databases, cache and code_cache from inside the process, then relaunches —
persisted state only, process memory survives (`pm clear` would force-stop the instrumentation
process running the tests, so the run would die before reporting)
[fn3] allow is pm grant; deny does not revoke — the driver asserts the permission is already denied
and fails the file when it is granted (an in-run pm revoke kills the instrumented process, so the
driver never executes one). Put the denied baseline in place before the run with
`jsonui-test pregrant --platform android`. unset leaves the inherited state untouched.
[fn4] Android: the host app's FLAG_DEBUGGABLE, or the application meta-data com.kotlinjsonui.SCREEN_MARKER set
to true. iOS: #if DEBUG, or com.swiftjsonui.SCREEN_MARKER = YES in the app's
Info.plist (SwiftUI marker only; the UIKit marker stays #if DEBUG). The flag lets UI
tests run on a configuration made from release, so they exercise optimized code. A shipped build declares
neither and draws no marker.
[fn5] visible means in the viewport on all three drivers (on Android, UiAutomator finds only what is drawn on
screen). Web: at least 1px each way of the element's box inside the
window's viewport and every ancestor that clips its content, after Playwright's isVisible(). iOS: at least 1pt
each way of the element's frame inside the window and every scroll view, table, collection view and web view
above it, read from one accessibility snapshot; while a sheet, alert or other modal is up, what is under it is
not visible. A test that asserts visible on content below the fold needs scrollUntilVisible first.
notVisible is the plain negation, so it passes for an element that is shown but below the fold. When the test
means the element must not be shown, assert hidden: not drawn, wherever
it is. count with equals: 0 is no substitute on web, where a statically written gone (display:none) or any
invisible element stays in the DOM and is counted.
Source-of-truth ownershipThe test toolchain spans several repos, each owning exactly one thing. Schemas live in jsonui-test-runner; the CLI and its validator constants live in jsonui-cli; each driver is published from its own repo; and a drift-check test in jsonui-cli keeps the schemas and the validator constants in lockstep in CI.Who owns what:
ownership
Moving part | Source of truth
-----------------------------------------+------------------------------------------------
Test schemas (screen/actions/flow/ | jsonui-test-runner (schemas/)
results/description) |
Validator constants (schema.py/report.py)| jsonui-cli
jsonui-test CLI | jsonui-cli (test_tools/, bundled with jui)
Drivers (iOS / Android / Web) | each driver repo (SPM / Maven Central / npm)
mock.schema.json | jsonui-test-runner (editor/doc only)
schema <-> validator drift-check | jsonui-cli CI (test_schema_drift.py)
Keep reading
Writing screen testsThe DSL these tables describe./guides/testing
Mocking APIs in testsBackend-free testing with mock scenarios./guides/api-mock