Test driving your development
The effort required to automatically test user interfaces or frontend software is often considered too expensive for the value it returns when it comes to avoiding future bugs. However, this is largely rooted in the toolkits being utilized or even the presentation technologies that have been chosen. Without full support for testing in the development tools or graphical APIs, it can be difficult to create simple unit tests without a huge amount of effort being needed.
One of the design principles of the Fyne toolkit is that the application GUI should be as easy to test as the rest of its code. This is partly made possible by the API's design, but this is further reinforced by the test utilities that we can provision. We will explore this later in this section. Using the following approaches, we will learn how a Fyne application can follow test-driven development (TDD), even for the user interface components.
Designed to be tested
The modular...