Kotlin client¶
The Kotlin client comes as two artifacts. The full API reference is generated by Dokka from the source.
-
Artifact
io.github.noamcohen48.tap:tap-client
Packageio.github.noamcohen48.tap.sdkConnect to the server, attach devices and drive them: selectors, actions, waits, apps and the whole screen, errors and the values the server returns.
-
Artifact
io.github.noamcohen48.tap:tap-junit5
Packageio.github.noamcohen48.tap.junit5The JUnit 5 extension:
@TapTest, device parameters, roles for several devices, and failure artifacts. Bringstap-clientwith it.
Where to start¶
| Type | What it is |
|---|---|
@TapTest |
Marks a JUnit 5 test class that uses devices. |
tapTest { } |
Wraps every test body; device calls run inside it. |
@TapDevices · Devices |
Several devices in one test, by role. |
Device |
One attached device: its apps (app(pkg)), its screen, keys, system panels, screenshots. |
Element · ElementWait |
Act on an element; wait until it is visible, gone, enabled… |
Selector |
How elements are found: res(...), text(...), desc(...) and refinements. |
App |
One app on a device: its elements (element, await), install, launch, stop, reset, and app waits. |
Screen |
Elements of any app or the system UI (device.screen.element, .await). |
TapClient · TapConnection |
Using the client without JUnit: connect and attach devices yourself. |