-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-pyramid.html
84 lines (71 loc) · 2.55 KB
/
test-pyramid.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test Pyramid</title>
<p id = "author" style="display:none">Rouven Gonzalez</p>
<p id = "date" style="display:none">07-27-2020</p>
</head>
<body>
<div id = "blog">
<h1 id= "title">
Test Pyramid
</h1>
<p id = "tldr">
For a software project to succeed you need a successful strategy to testing
The test pyramid is a form of testing your software on differnet levels.
It layers the testing to smaler parts of your projekt to simplify the process an makes it overall faster.
</p>
<br>
<br>
<div id = "content">
The test layers look like this:
<dl>
<dt>- 1. At the bottom are Unit Tests</dt>
<br>
<dd> These count for the majority of tests you have for your codebase.
This tests the smallest unit of code possible, only test a single method each. This builds the foundation for further testing.
</dd>
<br>
<br>
<dt>- 2. Middle level consists of Integration Tests</dt>
<br>
<dd>Which are tests designed to verify the integration of different parts of separate components of a software system together.
This can be integration with a Database, with a Framework, with third party external software systems, or an API.
For example testing the getBlog() function in our project with the coresponding API call would be such an Integration test.
</dd>
<br>
<br>
<dt>- 3. At the top is the end-to-end tests</dt>
<br>
<dd>Which are tests that verifies the end to end workflows of your codebase.
They tests the system from the user-action entry point right to the end of the system down to the database level.
However, these are typically black-box tests that are mostly performed manually.
</dd>
<br>
<br>
</dl>
<h2>Test coverage:</h2>
<p>
You should Unit test all your functions and together with the Integration tests this makes 80% of your total test coverage.
The 20% left is end to end testing that is still requiert to make shure your projekt works as intended.
</p>
<br>
<br>
<h2> References</h2>
<ul>
<li>
<a href="https://martinfowler.com/bliki/TestPyramid.html"> Short article by Martin Fowler</a>
</li>
<li>
<a href= "https://medium.com/@Colin_But/define-testing-strategy-using-the-testing-pyramid-1dabee37e823"> Detailed explanation</a>
</li>
<li>
<a href= "https://en.wikipedia.org/wiki/Integration_testing"> Integration testing wikipedia</a>
</li>
</ul>
</div>
</div>
</body>
</html>