File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments