Testing the Roku Streaming Stick+ with Stb-tester
20 Aug 2018.
Stb-tester has always supported Roku boxes (Roku HD, 2, 3, 4, Express, Express+, Premiere, Premiere+, and Ultra). Now, Stb-tester also supports the Roku Streaming Stick and Streaming Stick+.
To test your app you need a mechanism to control the Roku and a way to get feedback to check that your app is behaving as it should. With the other Roku models Stb-tester emulates an infrared remote control, but the Roku Streaming Sticks don’t have an infrared receiver (instead, their remote controls use Wi-Fi Direct).
All Roku models also provide an HTTP-based API for controlling the Roku device, which is used by Roku’s mobile app. Stb-tester now supports this API natively, allowing you to test Roku models that don’t have an infrared receiver (that is, you can now test the Roku Streaming Stick and Streaming Stick+).
Configuration
-
The Roku device and the Stb-tester Node must be on the same network.
-
On the Roku, go to Settings > Network > About. Note the Roku’s IP address.
-
On the Roku, go to Settings > System > Advanced system settings > Control by mobile apps > Network access. Make sure that it is set to “Default” or “Permissive”.
-
In your test-pack, create a configuration file for each Stb-tester Node under
config/test-farm/
, for exampleconfig/test-farm/stb-tester-abcdef123456.conf
(for more details see Configuration Reference: Node-specific configuration files in the Stb-tester manual). -
In the configuration file for the relevant Stb-tester Node, specify
test_pack.default_remote_control=roku_http
anddevice_under_test.ip_address=192.168.1.7
(change the actual IP address to the one you noted in step 2 above). For example:config/test-farm/stb-tester-abcdef123456.conf
[test_pack] default_remote_control = roku_http [device_under_test] ip_address = 192.168.1.7
Key names
In your test scripts you can use the following key names:
"KEY_BACK"
"KEY_HOME"
"KEY_UP"
"KEY_DOWN"
"KEY_LEFT"
"KEY_RIGHT"
"KEY_OK"
"KEY_AGAIN"
(instant replay)"KEY_INFO"
(star, options)"KEY_REWIND"
"KEY_PLAYPAUSE"
"KEY_FASTFORWARD"
You can also use the raw key names of Roku’s HTTP protocol directly (for
example, "Lit_a"
to enter the letter “a” when an on-screen keyboard is
present).
Reliability
We have tested 60,000 keypresses over 3 days without a single missed keypress (we validate that each and every keypress had the expected effect in the Roku’s UI).
Roku devices never really go to sleep, so you won’t have any issues in waking the device using the HTTP control mechanism.