Table of Contents
Sources:
- Software Testing course at ITMO university by Kochubeev Nikolay Sergeevich
FIRST
First: Fast, Isolated, Repeatable, Self-validating, Timely.
Even a properly structured test (AAA or GWT) can be useless: it is slow, environment-dependent, or requires manual verification. FIRST helps to avoid this by setting clear quality criteria.
Fast
The tests must be as fast as possible. They're supposed to run by all members on the team for each task, there can be hundreds of them for each commit.
Isolated
The tests should not depend on one another. Any dependencies to the database, network, clock must be emulated by the interface.
Repeatable
A test must give the same result in every environment.
Self-validating
Tests must be able to auto-detect if it passed or not.
Timely
The tests must be written before or during production. Otherwise you might end up testing only positives, forgoing testing the actual errors that influence production.
