In this recipe, we will use the Test-driven Development (TDD) approach. It means we first write tests that fail and then we implement the code, which will be required by the tests. We will explore how we can test Vaadin applications with pure JUnit tests without any mocking frameworks.
We will create a simple login form. The login form will be kept quite simple in this example, so we can easily absorb the idea of developing Vaadin applications with unit tests.
A simple login screen is as follows: