|
7 | 7 | * See also: |
8 | 8 | * [Continuous integration](continuous-integration.md) |
9 | 9 | * [Governance as a side effect](../patterns/governance-side-effect.md) |
| 10 | + * [Quality Metrics](../quality-checks.md) |
10 | 11 |
|
11 | 12 | ## Details |
12 | | - |
13 | | -* Software quality and testing is everyone's responsibility. |
14 | | -* Tests are automated by default (see [automate everything](../patterns/automate-everything.md)). |
| 13 | +* Quality is the whole team's responsibility |
| 14 | + * Software testing is the responsibility of the whole team. |
| 15 | + * Education on testing and testing principles is important to drive the right cultural behaviours. |
| 16 | + * Quality approaches should be driven as a team and implemented by everyone. |
| 17 | +* Combining business knowledge with testing knowledge yields better quality outcomes |
| 18 | + * Include business knowledge and critical thinking as part of assurance |
| 19 | + * Intrinsic knowledge and mindset of the team is key to driving quality outcomes |
| 20 | + * Use Behaviour Driven Development (BDD) as an approach to align testing across the whole team and customer |
| 21 | + * Consider BDD to encode acceptance criteria in business terms as automated tests where appropriate. |
| 22 | + * This can be an effective communication and collaboration tool where the product owner is involved in reviewing detailed acceptance criteria (expressed as BDD tests). |
| 23 | + * But if the PO is not involved in this way then well written unit and integration tests are often sufficient and avoid the extra layer of abstraction which BDD frameworks introduce. |
| 24 | +* Testing is prioritised based on risk |
| 25 | + * A testing risk profile is defined and understood by the whole team, including the customer |
| 26 | + * Risk appetite should be worked across the whole team, including customers and/or users |
| 27 | +* Use experiental / experimental / exploratory testing as well as formal methods |
| 28 | + * Gamify testing - try multiple techniques and learn as you go |
| 29 | +* Testing is assisted by automation with automated tests as a default (see [automate everything](../patterns/automate-everything.md)). |
| 30 | + * Appreciate that not everything can be automated |
| 31 | + * Identify good candidates for automation - particular focus on high risk and repeatable areas |
| 32 | +* Look to continually improve testing |
| 33 | + * Testing is a continuous activity, not a phase of delivery |
15 | 34 | * Tests act as documentation of the system's behaviour and should be clear enough to do this effectively. |
16 | 35 | * Tests are written alongside or before whatever they are testing. |
17 | 36 | * Tests are code (see [everything as code](../patterns/everything-as-code.md)). |
18 | | -* Use Behaviour Driven Development (BDD) to encode acceptance criteria in business terms as automated tests where appropriate. |
19 | | - * This can be an effective communication and collaboration tool where the product owner is involved in reviewing detailed acceptance criteria (expressed as BDD tests). |
20 | | - * But if the PO is not involved in this way then well written unit and integration tests are often sufficient and avoid the extra layer of abstraction which BDD frameworks introduce. |
21 | 37 | * Tests and test suites must be executable from the command line via a single command. |
22 | 38 | * Tests do not rely on other tests (i.e. each test can be executed in isolation, tests can be run concurrently and in any order). |
23 | 39 | * Tests only check a single condition. |
|
26 | 42 | * New functionality must be covered by passing automated tests (unless there is a legitimate reason not to). |
27 | 43 | * Consider where best to add tests within the [test pyramid](https://martinfowler.com/articles/practical-test-pyramid.html) — in general, the lower the better. |
28 | 44 | * Avoid testing the same thing at multiple levels of the test pyramid. |
| 45 | +* Consider using the [agile testing quadrant](https://lisacrispin.com/2011/11/08/using-the-agile-testing-quadrants/) to help support a whole team approach around test planning and test automation. |
29 | 46 | * Use stubs to test the behaviour of components in isolation — focus tests of multiple services on validating the interactions between services e.g. using consumer-driven contract testing. |
30 | 47 | * Do not add tests of no value (e.g. tests of default getters/setters) just to increase the coverage level — 100% coverage is not a good use of time. |
31 | 48 | * Tests must pass before code can be merged. |
|
0 commit comments