lundi 9 octobre 2017

How to decide the scope of integration tests?

I have this data processing program and I cannot bring my head around what test cases are supposed to be in integration tests and unit tests.

For example there will be extremely similar/duplicate scenarios that exist in both types of tests.

  • In unit tests, I expect exceptions to be thrown when invalid data input is detected.
  • In integration tests, I expect a warning message to be shown when there is invalid input.

Since there are so many cases of invalid input, I would have all the cases covered in both unit tests and integration tests.

Also I have duplicate cases of the same data set.

  • In unit test the function that generates the output will be tested.
  • In integration test, I validate the output obtained from the output generator.

By doing this, the unit tests and integration tests would turn out to cover so many similar cases. I am aware that there are supposed to be a lot less integration tests than unit tests according to Agile Testing Pyramid, but how do I decide what to exclude in integration tests?

Aucun commentaire:

Enregistrer un commentaire