vendredi 5 février 2016

Component vs Integration vs Functional tests

Recently I figured out that my understanding of different types of tests maybe is not completely right.

E.g. Unit test is testing of one unit where interaction with other units is based on mocks (fakes, stubs). So, no interaction with file system, threads, time...

Component tests, for me, were tests around one component (more units) where I used both, mocks and "real" resources. Both of them I used for input simulation and output tests. Whatever seemed more appropriate. E.g. I am mocking change of current arbitration state, but I am asserting that events are stored into RTDB.

These components, for me, were usually slices of one application.

Functional tests I considered as (black box) tests around my application (exe) that runs in production.

Well, is this really true or not? Are component tests only based on mocks? If yes, why? How can I be sure that mocks are good enough? Should we run application from functional tests or not? Why is it different than bootstrap of app main routine in a thread? What are integration tests?

I would like to hear other opinions and how do you do that. What tests do you have, how do you maintain them and who is responsible for them in your team?

Cheers!

Aucun commentaire:

Enregistrer un commentaire