Visualising test results with PyTest and Philips Hue

Image for post
Image for post
I built a test reporter for PyTest that controls my Philips Hue lamp based on the test results

Controlling your lights with Python

If you don’t have rooms set up you can use bridge.lights() to get all lights

Controlling the brightness and colour

Building a test reporter in PyTest

Adding configuration values

Calculating test run progress

Using the test run progress to set light parameters

int(255 * (executed_tests / total_tests))

Demo

A demonstration of the PyTest-Hue test reporter
pip install pytest-hue

Next Steps

Written by

Technical Lead at BJSS. Interested in Automated Testing, Dev practises, Metal, Chiptune. All views my own.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store