RequireDevice

annotation class RequireDevice(val role: String = DEFAULT_ROLE, val minApi: Int = 0, val maxApi: Int = Int.MAX_VALUE, val kind: DeviceKind = DeviceKind.ANY, val manufacturer: String = "", val modelContains: String = "")(source)

Which devices may play role, from what the server reports about them (DeviceEntry.properties). On a test method or class, once per role; a method's annotation replaces its class's for the same role, and the role must be one the test declares (a Device parameter, TapDevice or TapDevices). Every part that is set must hold. A device whose properties the server could not read fits no criteria, and a role pinned with tap.device.<role> must fit too. When no available device (or no combination of them, for several roles) fits, the test is skipped before anything is attached, naming the devices it saw.

Properties

Link copied to clipboard
Link copied to clipboard

ro.product.manufacturer, ignoring case; empty = any.

Link copied to clipboard
val maxApi: Int

Highest API level, inclusive.

Link copied to clipboard
val minApi: Int = 0

Lowest API level, inclusive.

Link copied to clipboard

A part of ro.product.model, ignoring case; empty = any.

Link copied to clipboard