Let the computer test your Python GUI application
Let the computer test your Python GUI application In this article you’ll see how easy it is to write automated tests for Graphical User Interfaces (GUIs) written using the brilliant guizero Python library. I’ll start with a horror story which explains why I’m so keen on automated GUI tests. Next I’ll describe an application that I’m using as an example. The code for the app and the test are available on GitHub; the link is in the resources section at the end of this post. After that, I’ll show how the tests are built up and describe how they enabled me to find and fix a bug. A personal horror story A couple of years ago I presented a Quiz Runner application to an audience of Digital Makers. The Quiz Runner application used a workstation to manage the Quiz. Quiz Contestants used micro:bits to ‘buzz’ in when they thought they knew an answer. The micro:bits communicated via radio using the micro:bit’s built-in radio capability, and everything (workstation and micro:bits) was pro...