I've just finished reading this article about functional testing :
And there is a point i want to talk about. At the page 13, he ask what values for a, b, c we should test to garantee that the feature of the Root class is working.
I have the exactly same question but for a more complex exemple. I have database and a save method. The save method feature is to save data in the database. To test if the feature is working i follow the nexts instructions :
- I initialize a test data.
- I use the save method to put it in the database
- I reload the data from the data base
- I compare the initial data and the loaded one.
If the datas are the same, i can conclude that the save method feature is working. Is this test sufficient to ensure that my method is working ? because it seems to be a little too simple.
Aucun commentaire:
Enregistrer un commentaire