Author:
Test⚓︎
Types of Tests⚓︎
There are four major types of tests
. You can see their relations in the diagram below:
Definitions
- Formula: \(A\)
- Explanation: test the function of the smallest functional unit
A
. Each unit is independent. - Note:
Code coverage
: for quantity, measure how much of the original code has been tested.
- Formula: \(A\supset B\) or \(A\rightarrow B\)
- Explanation: test the function of the parent function
A
includingB
. - Note: Test
A
individually needsdependency injection
. TestB
individually can just useunit test
.
- Formula: \(A\supset B + C\)
- Explanation: test object: Some system function from frontend
C
to backendA
. - Note: The
system test
is the same asUI test
, which focuses on some system functions.
- Formula: \(U_{Frontend} + U_{Backend}\)
- Explanation: End to end tests. From frontend to backend for all the system functions.
- Note: One specific
E2E test
or a fewE2E tests
specific to some feature is classified intosystem tests
.
- Formula: \(\forall \{A|A\in U_{Frontend}\} + \{C|C\in U_{Backend}\}\)
- Explanation: manual and arbitrary tests from customers or maintainers.
Syntax of Tests⚓︎
Tests syntax
- Given: setup & assumptions
- When: thing that actually be tested
- Then: assertions (what do you expect)
References:⚓︎
Last update:
December 6, 2022 21:08:36
Created: December 5, 2022 10:33:13
Created: December 5, 2022 10:33:13