17 Dec 2024.

Tags: Device Setup

Stb-tester can capture logs from the device-under-test (such as ADB logs from an Android device) and display them alongside the logs from the Python test script itself. As always, the timestamps in the log are accurately synchronised with the video-recording of the automated test-run or manual testing session.

Screenshot of Stb-tester's log viewer web interface
Stb-tester's interactive log viewer with video recording and ADB logs

We recommend using a pytest fixture to start and stop log capture. Pytest is the test-runner used by Stb-tester since v33; a fixture allows you to run code before and after every test-case. (See pytest’s documentation on fixtures.)

For detailed instructions see the new chapter in the Stb-tester manual: Capturing logs from the device-under-test.