Popular types of tests and their authors

There are many functional test types in modern software development. I will discuss few, let’s say most popular of them.

Isolation aka Unit test. Who should write them? Programmer. We write source code so we best know how to ensure a method or a class does it’s job. I’m not a fan of 100% code coverage because it is not going in pair with product quality and can badly increase software maintenance costs.

Integration test. Lets suppose we have a BooksRepository with getBook method. In unit test we can instantiate this repository with some SpyStorageObject injected and assert some specific method calls were made on this storage. But it may bring lower value than integration test communicating with real database and asserting that certain data were resolved out of some stack.

Who should write integration tests? Programmer, system architect, tech lead.

Acceptance (aka beta) tests. Those tests describe business rules and expectations. Should be written descriptive and in user-friendly manner by QA / business specialist.

Sample acceptance test written in Codeception:

Leave a Reply