samedi 5 décembre 2015

Why in unit testing tests should not depend on the order of execution?

It is a very often opinion that unit testing should not rely on tests order. I think it is not an exact rule but recommendation.

But in some cases it does not look good. For example I have CUtility class and CSoket, which uses CUtility methods. I want to run tests in a singe unit test execution. So it is logically to run CUtility test first and after that run CSoket tests.

But best practice of unit testing says: Do not rely on tests order. Why?

Aucun commentaire:

Enregistrer un commentaire