To build a reliable product it is essential that we build ways for us to ensure that what we build also works as expected.
In its simplest form that means that you try what you build, the assumption being that if it works for you, it works for everyone.
- By now we all know that “works for me” is not enough, but there are also a variety of additional challenges;
- It’s not enough to only test when a feature is first implemented, the tests need to be repeated regularly to ensure nothing breaks that once worked.
- There is a balance to be struck between over- and under- testing. Tests need to be of high quality and have to be maintained with the system, otherwise they become a burden instead of an asset.
- The right things need to be tested. Test things that are too trivial and you end up with loads of tests with little value (but a maintenance cost). Test things that are too complex and your tests become fragile and don’t tell you what broke, making fixing it harder.
- The testenvironment needs to be realistic enough so we test the right things (e.g. we don’t want to test the internet connection typically), yet also removes the bits that we don’t have under our control, so we test our system only. That ensure that the test remain reliable and are fast to run (so they are run regularly).