Test 04

During the development of this test we coded another part of the OnDelete() method and here we discover that we developed the warning message behaviour. During this development, the developer noticed that after the first warning, the sentence keeps staying visible on the scene, so he implemented a way to make it disappear. It could be a good idea at first glance but, he violated some principles of BDD:


  • There is not a requirement for that behaviour: people who give the requirements and write the acceptance criteria have a big picture of the project. At first glance, it seems to be an omission but could also be a proper intent. Perhaps there is going to be a new requirement the week after that could ask to make disappear the warning message pressing a third button called “Clear”. In this case, the developer could not remember the little line he already added the week before (or it can be another developer, of course), and the development of the new requirement could be tricky because the developer has to know that he has to delete some previous code. If the developer is not sure if there is an omission, the right way is to ask for an explanation. If there is an omission, he receives the additional requirement.
  • The most important fact is: that line of code is not tested. There is not a test to verify that behaviour. It is not enough that during the execution of the existing tests that line of code is executed. In some particular cases, you could find an unexpected behaviour of your software just because of that line.


Back to: Test 03 Read next: Static BDD Test: Creation of a GameObject


© 2017 Hud Dimension. All Rights Reserved.