Skip to main content

Device API

Device Info

Information and system control of the underlying device under test. Usually not needed.

device.info()

DESCRIPTION

Returns information about the device under test such as Make Model Year Location and OS type. This flag typically isn't called as it's automatically uploaded to each test result

SIGNATURE

device.info()
returns DeviceInfo {
deviceType: STB | TV
make: String
model: String
year: Number
}

USAGE

if device.info().make == "LG" then
print("On an LG Device")
end

device.os()

DESCRIPTION

Returns information about the OS of the device

SIGNATURE

device.os()
returns OSDetails{ platform: Platform, version: String }

USAGE

if device.os().platform == OS.Tizen && device.os().version == "1.4.0" then
print("Not suggested to hard code specific version info")
end

Applications

device.launchApp

DESCRIPTION

Launches an app on the target device based

SIGNATURE

device.launchApp(name: String)
returns void

USAGE

device.launchApp("Netflix")

device.killApp

DESCRIPTION

Terminates an app by name

SIGNATURE

device.killApp(name: String)
returns void

USAGE

device.killApp("Netflix")

Configuration

device.configureNetwork()

DESCRIPTION

Allows control over the network speed of the device under test to simulate real world scenarios

SIGNATURE

device.configureNetwork(
networkType: NetworkType = NetworkType.WIFI
throttle: ThrottleType = ThrottleType.Unthrottled
)
returns Boolean

USAGE

describe("Testing on low bandwidth", function ()
setup(function ()
device.configureNetwork(NetworkType.WIFI, 1_000)
end)

--- Tests under low bandwidth
end)

device.configureRemoteProtocol()

Management

device.powercycle()

device.powercycle() // Uses PDU