Skip to content

Commit 66ab13e

Browse files
authored
Merge pull request #10 from ExtensionEngine/automated-testing-intro-suggestions
Quality over quantity section suggestions
2 parents 499edbd + 32fcf44 commit 66ab13e

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

recipes/automated-testing.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
# Automated Testing
2+
## Glossary
3+
**Confidence** - describes a degree to which passing tests guarantee that the app is working
4+
**Determinism** - describes how easy it is to determine where the problem is based on the failing test
25

36
## Testing best practices
47

5-
Writing tests can be hard because there are a lot of things that can be tested.
8+
### Quality over quantity
9+
Don't focus on achieving a specific code coverage percentage.
10+
While code coverage can help us identify uncovered parts of the codebase, it doesn't guarantee high confidence.
611

7-
Starting out can be overwhelming. But since writing tests is easy, we can write
8-
a lot of them in no time. Don't do this. Do not focus on code coverage number as
9-
it can lead to false sense of security. Remember that code with 100% test coverage
10-
can still have bugs.
11-
12-
Focus on test quality and test performance. Make sure the test is not asserting
13-
unimportant things. Make sure the test is as quick as possible. Quick tests will
14-
be run often. Running tests often means more early bug detection which means less
15-
production errors.
12+
Instead, focus on identifying important paths of the application, especially from user's perspective.
13+
User can be a developer using a shared function, a user interacting with the UI, or a client using server app's JSON API.
14+
Write tests to cover those paths in a way that gives confidence that each path, and each separate part of the path works as expected.
1615

1716
---
1817

0 commit comments

Comments
 (0)