As you may recall, when we created the project for RpnCalculator
, we toggled on UI testing too, giving us the ability to run a full suite test using the UI of the app, as if the app were run by a user.
In this section, we'll explore the surface of UI testing, the reasons to do UI testing, when to stop, and how to write the tests.
It's common thinking that the tests that use the UI are generally slow and brittle, and difficult to write and maintain. Nevertheless, UI testing is a practice that is useful to consider when designing the test strategy for developing a software. A few years ago, Mike Cohn defined the Agile Testing Pyramid in his book Succeeding with Agile: Software Development Using Scrum, which describe the types of tests, and how many are required for each type of implement action to be effective: