When I am developing a unit or integration test for a function or service I always try to avoid using other implemented functions for the setup and assertations, e.g. if I have a service CREATE_NEW_DUMMMY
that ends up saving something in a database, its test will not resort to my other implemented service RETRIEVE_DUMMY
to assert whether the object was indeed inserted - instead I access the database directly.
However if someone is developing a functional black-box test for an application he/she may not be aware of implementation details such as the existence of a database, nor how to access it. In a case like this, does the above-described "rule" still hold? What would be an appropriate way to evaluate correctness without having to rely solely on trivial things such as a 200 ok
response?
Aucun commentaire:
Enregistrer un commentaire