Skip to content

Commit 1f3d6ac

Browse files
authored
Testing principles (#123)
* Testing principles added * Added link to agile testing quadrant to address issue from Clare Youngman
1 parent 6cfcd96 commit 1f3d6ac

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

practices/testing.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,33 @@
77
* See also:
88
* [Continuous integration](continuous-integration.md)
99
* [Governance as a side effect](../patterns/governance-side-effect.md)
10+
* [Quality Metrics](../quality-checks.md)
1011

1112
## 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
1534
* Tests act as documentation of the system's behaviour and should be clear enough to do this effectively.
1635
* Tests are written alongside or before whatever they are testing.
1736
* 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.
2137
* Tests and test suites must be executable from the command line via a single command.
2238
* 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).
2339
* Tests only check a single condition.
@@ -26,6 +42,7 @@
2642
* New functionality must be covered by passing automated tests (unless there is a legitimate reason not to).
2743
* Consider where best to add tests within the [test pyramid](https://martinfowler.com/articles/practical-test-pyramid.html) — in general, the lower the better.
2844
* 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.
2946
* 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.
3047
* 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.
3148
* Tests must pass before code can be merged.

0 commit comments

Comments
 (0)