Series: Real World Testing with Xamarin.Forms

We use the phrase "Real World Testing" in this series because we know our suggestions and instruction confidently come from our experience building applications for clients. Test Driven Development. It is a practice that is a bit controversial. The concept is so practical it almost seems a given that you should always write code that tests your code. However, in practice, TDD can make your work become clumsy, brittle, and unpleasant. Much like the programmer that hits button in the same sequence while testing, a lot of documentation about testing tend to follow the same "happy path" of sorts. Examples of unit testing include things like payroll calculators or bowling score calculators. We don't know about you, but our apps tend to be much plainer, but have very sophisticated user interfaces. If at minimum 50% of the code your write is user interface related, how do you TDD that? In this series, Ben Bishop will cover the following:
  • What is TDD? What is the Red-Green-Blue/Refactor cycle?
  • How do you keep your tests lean and mean
  • What is more important? Code that is easy to write or read?
  • Techniques to keep test code to a minimum
  • Is this yak shaving?
  • Can I do TDD with UI tests?
Users hate bugs. Product owners hate bugs. We hate bugs. Bugs are the biggest obstacle to "done." Bugs cause missed deadlines and delays. Bugs cause stress and friction. We need less bugs. Unit tests. Integration tests. UI tests. TDD. BDD. These have all been hailed as the cure to all of our ills. However, tests are not the cure. Tests are just the tools we use to see the cure: better code.