@radicaltools/cli 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +353 -33
- package/dist/hub-catalogue/concern/concern-api-collections.radical +1136 -0
- package/dist/hub-catalogue/concern/concern-api-errors.radical +1180 -0
- package/dist/hub-catalogue/concern/concern-api-evolution.radical +1174 -0
- package/dist/hub-catalogue/concern/concern-api-idempotency.radical +1218 -0
- package/dist/hub-catalogue/concern/concern-api-resource-design.radical +1102 -0
- package/dist/hub-catalogue/concern/concern-api-style-guide.radical +1210 -0
- package/dist/hub-catalogue/concern/concern-architecture-style.radical +1268 -0
- package/dist/hub-catalogue/concern/concern-audit-trail.radical +1096 -0
- package/dist/hub-catalogue/concern/concern-authentication.radical +895 -0
- package/dist/hub-catalogue/concern/concern-authorization.radical +1686 -0
- package/dist/hub-catalogue/concern/concern-availability.radical +1028 -0
- package/dist/hub-catalogue/concern/concern-backend-stack.radical +1037 -0
- package/dist/hub-catalogue/concern/concern-backup-recovery.radical +1560 -0
- package/dist/hub-catalogue/concern/concern-caching.radical +1294 -0
- package/dist/hub-catalogue/concern/concern-capacity.radical +915 -0
- package/dist/hub-catalogue/concern/concern-code-documentation.radical +1397 -0
- package/dist/hub-catalogue/concern/concern-code-quality-gate.radical +1409 -0
- package/dist/hub-catalogue/concern/concern-code-review-branching.radical +1416 -0
- package/dist/hub-catalogue/concern/concern-code-style.radical +1058 -0
- package/dist/hub-catalogue/concern/concern-communication-style.radical +1508 -0
- package/dist/hub-catalogue/concern/concern-data-classification.radical +970 -0
- package/dist/hub-catalogue/concern/concern-data-consistency.radical +1112 -0
- package/dist/hub-catalogue/concern/concern-data-store.radical +1282 -0
- package/dist/hub-catalogue/concern/concern-decomposition.radical +1318 -0
- package/dist/hub-catalogue/concern/concern-definition-of-done.radical +1214 -0
- package/dist/hub-catalogue/concern/concern-delivery-metrics.radical +966 -0
- package/dist/hub-catalogue/concern/concern-dependency-hygiene.radical +1345 -0
- package/dist/hub-catalogue/concern/concern-deployment.radical +1203 -0
- package/dist/hub-catalogue/concern/concern-encryption.radical +1318 -0
- package/dist/hub-catalogue/concern/concern-error-handling-logging.radical +1197 -0
- package/dist/hub-catalogue/concern/concern-eu-dora.radical +1321 -0
- package/dist/hub-catalogue/concern/concern-frontend-stack.radical +1647 -0
- package/dist/hub-catalogue/concern/concern-incident-management.radical +1204 -0
- package/dist/hub-catalogue/concern/concern-infrastructure.radical +2183 -0
- package/dist/hub-catalogue/concern/concern-integration-resilience.radical +1116 -0
- package/dist/hub-catalogue/concern/concern-messaging.radical +973 -0
- package/dist/hub-catalogue/concern/concern-module-boundaries.radical +867 -0
- package/dist/hub-catalogue/concern/concern-observability.radical +997 -0
- package/dist/hub-catalogue/concern/concern-operational-readiness.radical +1249 -0
- package/dist/hub-catalogue/concern/concern-personal-data.radical +1949 -0
- package/dist/hub-catalogue/concern/concern-quality-priorities.radical +1091 -0
- package/dist/hub-catalogue/concern/concern-rate-limiting.radical +1445 -0
- package/dist/hub-catalogue/concern/concern-release-versioning.radical +1358 -0
- package/dist/hub-catalogue/concern/concern-retention.radical +1399 -0
- package/dist/hub-catalogue/concern/concern-secrets.radical +1284 -0
- package/dist/hub-catalogue/concern/concern-secure-coding.radical +1379 -0
- package/dist/hub-catalogue/concern/concern-secure-development.radical +1245 -0
- package/dist/hub-catalogue/concern/concern-security-detection.radical +1153 -0
- package/dist/hub-catalogue/concern/concern-supply-chain.radical +1386 -0
- package/dist/hub-catalogue/concern/concern-technical-debt.radical +1450 -0
- package/dist/hub-catalogue/concern/concern-technology-lifecycle.radical +1145 -0
- package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +1440 -0
- package/dist/hub-catalogue/concern/concern-test-strategy.radical +1212 -0
- package/dist/hub-catalogue/concern/concern-threat-modelling.radical +1143 -0
- package/dist/index.js +12712 -7144
- package/package.json +5 -3
|
@@ -0,0 +1,1212 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hub": {
|
|
3
|
+
"id": "concern-test-strategy",
|
|
4
|
+
"category": "concern",
|
|
5
|
+
"name": "Test strategy",
|
|
6
|
+
"description": "Which tests the element has at which level, which gates a change must pass, where end-to-end tests run, where test data comes from, and what happens to a flaky test. The snippets are for a Node project with Vitest, Playwright, Stryker, SonarQube and Checkly; each tool line names the JVM equivalent.",
|
|
7
|
+
"tags": [
|
|
8
|
+
"maintainability",
|
|
9
|
+
"testing",
|
|
10
|
+
"test pyramid",
|
|
11
|
+
"testing trophy",
|
|
12
|
+
"mutation testing",
|
|
13
|
+
"flaky tests"
|
|
14
|
+
],
|
|
15
|
+
"requiredMetamodel": "c4-ddd-governance-builtin",
|
|
16
|
+
"concern": {
|
|
17
|
+
"id": "test-strategy",
|
|
18
|
+
"trigger": "LIST NODES WHERE (type = \"container\" OR type = \"webapp\") AND external != true",
|
|
19
|
+
"why": "code lives in these elements, so how it is tested before a change is released has to be decided.",
|
|
20
|
+
"group": "sdlc"
|
|
21
|
+
},
|
|
22
|
+
"sources": [
|
|
23
|
+
{
|
|
24
|
+
"title": "Martin Fowler: TestPyramid",
|
|
25
|
+
"url": "https://martinfowler.com/bliki/TestPyramid.html"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"title": "Ham Vocke: The Practical Test Pyramid (martinfowler.com)",
|
|
29
|
+
"url": "https://martinfowler.com/articles/practical-test-pyramid.html"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"title": "Martin Fowler: Eradicating Non-Determinism in Tests",
|
|
33
|
+
"url": "https://martinfowler.com/articles/nonDeterminism.html"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"title": "Martin Fowler: Continuous Integration",
|
|
37
|
+
"url": "https://martinfowler.com/articles/continuousIntegration.html"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"title": "Jez Humble, David Farley: Continuous Delivery (the deployment pipeline)",
|
|
41
|
+
"url": "https://www.oreilly.com/library/view/continuous-delivery-reliable/9780321670250/"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"title": "Cindy Sridharan: Testing in Production, the safe way",
|
|
45
|
+
"url": "https://copyconstruct.medium.com/testing-in-production-the-safe-way-18ca102d0ef1"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"title": "ISO/IEC 25010, Maintainability: testability",
|
|
49
|
+
"url": "https://iso25000.com/index.php/en/iso-25000-standards/iso-25010"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"title": "SonarQube: Clean as You Code",
|
|
53
|
+
"url": "https://docs.sonarsource.com/sonarqube-server/latest/core-concepts/clean-as-you-code/"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"title": "Stryker Mutator",
|
|
57
|
+
"url": "https://stryker-mutator.io/"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"title": "PIT mutation testing",
|
|
61
|
+
"url": "https://pitest.org/"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"title": "Testcontainers",
|
|
65
|
+
"url": "https://testcontainers.com/"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"title": "Regulation (EU) 2016/679 (GDPR), Articles 25 and 32",
|
|
69
|
+
"url": "https://eur-lex.europa.eu/eli/reg/2016/679/oj"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"templateParams": [
|
|
73
|
+
{
|
|
74
|
+
"key": "SHAPE",
|
|
75
|
+
"title": "Test shape",
|
|
76
|
+
"label": "Where does most of the testing happen?",
|
|
77
|
+
"hint": "The shape says which level carries the bulk of the tests: it decides how fast feedback is, how much a refactoring breaks, and what a green build proves. Contract tests between parts and with outside callers are decided in the Communication style and API evolution packs, not here.",
|
|
78
|
+
"defaultValue": "pyramid",
|
|
79
|
+
"options": [
|
|
80
|
+
{
|
|
81
|
+
"value": "pyramid",
|
|
82
|
+
"label": "a test pyramid, mostly unit tests",
|
|
83
|
+
"description": "Many fast unit tests, fewer integration tests, a handful of end-to-end tests. Pick it when the element holds real domain logic (calculations, rules, state machines) that can be tested in isolation."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"value": "trophy",
|
|
87
|
+
"label": "a testing trophy, mostly integration tests",
|
|
88
|
+
"description": "Most tests run the element with its real database in a container and fake only what lies outside it; static analysis and a few unit tests below, a few end-to-end tests above. Pick it for web apps and services that mostly glue a framework, a database and other APIs together."
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"key": "GATE",
|
|
94
|
+
"title": "Quality gate",
|
|
95
|
+
"label": "What must the tests prove before a merge?",
|
|
96
|
+
"hint": "Coverage shows which lines ran; mutation testing shows whether a test would notice a line being wrong. Mutation testing costs build time.",
|
|
97
|
+
"defaultValue": "coverage",
|
|
98
|
+
"options": [
|
|
99
|
+
{
|
|
100
|
+
"value": "coverage",
|
|
101
|
+
"label": "coverage of new code",
|
|
102
|
+
"description": "New and changed lines must be covered by tests to a set percentage. Pick it as the baseline for any codebase, or when build time is tight."
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"value": "mutation",
|
|
106
|
+
"label": "coverage and a mutation score",
|
|
107
|
+
"description": "Coverage, plus a minimum share of mutants killed in changed code. Pick it when the element holds business rules where a wrong condition costs money or trust, and the build can afford a few extra minutes."
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"key": "DATA",
|
|
113
|
+
"title": "Test data",
|
|
114
|
+
"label": "Where does test data come from?",
|
|
115
|
+
"hint": "Data shared between tests makes them depend on order; production copies carry personal data.",
|
|
116
|
+
"defaultValue": "synthetic",
|
|
117
|
+
"options": [
|
|
118
|
+
{
|
|
119
|
+
"value": "synthetic",
|
|
120
|
+
"label": "data built by each test",
|
|
121
|
+
"description": "Each test creates the data it needs with builders or factories, in a fresh or rolled-back database. Pick it by default: tests stay independent and can run in parallel."
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"value": "fixtures",
|
|
125
|
+
"label": "versioned seed datasets",
|
|
126
|
+
"description": "Reviewed seed datasets kept with the tests are loaded into a fresh database for each run. Pick it when the data needed is large or intricate (a product catalogue, tariffs) and the same for many tests."
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"value": "masked",
|
|
130
|
+
"label": "masked copies of production",
|
|
131
|
+
"description": "Production data, with personal data masked or replaced, is copied into test environments. Pick it only when realistic volume and distribution matter (performance, migrations, reports) and synthetic data cannot reproduce them."
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"key": "E2E",
|
|
137
|
+
"title": "End-to-end",
|
|
138
|
+
"label": "Where do the end-to-end tests run?",
|
|
139
|
+
"hint": "End-to-end tests are the slowest and most brittle; where they run decides what they can stop.",
|
|
140
|
+
"defaultValue": "pipeline",
|
|
141
|
+
"options": [
|
|
142
|
+
{
|
|
143
|
+
"value": "pipeline",
|
|
144
|
+
"label": "an ephemeral environment per pull request",
|
|
145
|
+
"description": "Every pull request is deployed to a short-lived environment and the journeys run there before the merge. Pick it when environments can be created in minutes (containers, infrastructure as code)."
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"value": "staging",
|
|
149
|
+
"label": "staging, after the merge",
|
|
150
|
+
"description": "Merged builds deploy to a shared staging environment and the journeys gate the promotion to production. Pick it when a full environment is too costly to create per pull request."
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"value": "production",
|
|
154
|
+
"label": "production, as synthetic checks",
|
|
155
|
+
"description": "No end-to-end gate before release; the journeys run against production after each deploy and on a schedule, and a failure rolls back. Pick it when you deploy many times a day behind feature flags with fast, automated rollback."
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"key": "FLAKY",
|
|
161
|
+
"title": "Flaky tests",
|
|
162
|
+
"label": "What happens to a test that fails at random?",
|
|
163
|
+
"hint": "A test that fails and passes on the same code teaches everyone to rerun until green, and then real failures are rerun too.",
|
|
164
|
+
"defaultValue": "quarantine",
|
|
165
|
+
"options": [
|
|
166
|
+
{
|
|
167
|
+
"value": "quarantine",
|
|
168
|
+
"label": "quarantine, then a fix or deletion",
|
|
169
|
+
"description": "The flaky test is moved out of the gate within a day, given an owner, and fixed or deleted within a deadline. Pick it for larger suites and several teams, where blocking everyone on one test costs more than the lost check."
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"value": "zero",
|
|
173
|
+
"label": "a failure like any other",
|
|
174
|
+
"description": "No automatic retries: a test that fails and then passes fails the build, and is fixed before anything else merges. Pick it for a small suite and one team, where flakes are rare and fixed at once."
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"key": "PIPELINE_MINUTES",
|
|
180
|
+
"label": "Within how many minutes must the pull-request test run finish?",
|
|
181
|
+
"defaultValue": "10",
|
|
182
|
+
"type": "number"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"key": "COVERAGE",
|
|
186
|
+
"label": "What coverage of new code is required (%)?",
|
|
187
|
+
"defaultValue": "80",
|
|
188
|
+
"type": "number"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"key": "MUTATION",
|
|
192
|
+
"label": "What mutation score is required on changed code (%)?",
|
|
193
|
+
"defaultValue": "70",
|
|
194
|
+
"type": "number"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"key": "JOURNEYS",
|
|
198
|
+
"label": "Which user journeys do the end-to-end tests cover (one Playwright spec each, e2e/<journey>.spec.ts)?",
|
|
199
|
+
"defaultValue": "sign-in, search, checkout"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"key": "QUARANTINE_DAYS",
|
|
203
|
+
"label": "Within how many days must a quarantined test be fixed or deleted?",
|
|
204
|
+
"defaultValue": "7",
|
|
205
|
+
"type": "number"
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
"nodes": [
|
|
210
|
+
{
|
|
211
|
+
"id": "need",
|
|
212
|
+
"type": "need",
|
|
213
|
+
"label": "Changes are released with confidence",
|
|
214
|
+
"x": 0,
|
|
215
|
+
"y": 0,
|
|
216
|
+
"kind": "brief",
|
|
217
|
+
"source": "Hub concern pack: Test strategy",
|
|
218
|
+
"description": "The element changes often, and every change must be releasable without fear: the tests have to catch a broken rule, a broken integration and a broken journey before users do, give that answer quickly enough that people wait for it, and give the same answer every time they run on the same code. A green build must mean something. The checks below share one layout: unit tests under test/unit, integration tests under test/integration, end-to-end journeys as Playwright specs under e2e/<journey>.spec.ts, JUnit reports written to reports/<suite>.xml, quarantined tests listed in quarantine.json."
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"id": "req-pr-suite",
|
|
222
|
+
"type": "requirement",
|
|
223
|
+
"label": "Fast tests on every change",
|
|
224
|
+
"x": 260,
|
|
225
|
+
"y": 0,
|
|
226
|
+
"ears_type": "event-driven",
|
|
227
|
+
"trigger": "a pull request is opened or updated",
|
|
228
|
+
"action": "run the unit and integration tests within {{PIPELINE_MINUTES}} minutes and block the merge on any failure",
|
|
229
|
+
"rationale": "Feedback that takes longer than about ten minutes is no longer waited for, and changes pile up untested (Fowler, Continuous Integration: keep the build fast)."
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"id": "req-coverage",
|
|
233
|
+
"type": "requirement",
|
|
234
|
+
"label": "New code is covered",
|
|
235
|
+
"x": 260,
|
|
236
|
+
"y": 130,
|
|
237
|
+
"ears_type": "ubiquitous",
|
|
238
|
+
"action": "cover at least {{COVERAGE}}% of new and changed lines, branches included, with automated tests, measured on each pull request",
|
|
239
|
+
"rationale": "A gate on new code keeps coverage from falling without demanding that old code be fixed first (SonarQube, Clean as You Code; ISO/IEC 25010 testability)."
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"id": "req-mutation",
|
|
243
|
+
"type": "requirement",
|
|
244
|
+
"label": "Tests notice wrong code",
|
|
245
|
+
"x": 260,
|
|
246
|
+
"y": 260,
|
|
247
|
+
"ears_type": "ubiquitous",
|
|
248
|
+
"action": "kill at least {{MUTATION}}% of the mutants generated in the files each pull request changes",
|
|
249
|
+
"rationale": "Coverage shows that a line ran, not that a test would fail if it were wrong; a surviving mutant is a change no test notices (Stryker Mutator; PIT).",
|
|
250
|
+
"hubWhen": {
|
|
251
|
+
"GATE": [
|
|
252
|
+
"mutation"
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"id": "req-pyramid",
|
|
258
|
+
"type": "requirement",
|
|
259
|
+
"label": "Mostly fast unit tests",
|
|
260
|
+
"x": 260,
|
|
261
|
+
"y": 390,
|
|
262
|
+
"ears_type": "ubiquitous",
|
|
263
|
+
"action": "keep at least 70% of the automated tests as unit tests that touch no network and run in under 100 ms each, and at most 10% as end-to-end tests",
|
|
264
|
+
"rationale": "Tests low in the pyramid are fast, precise about what broke and cheap to keep; high ones are slow and brittle, so few of them (Fowler, TestPyramid; Vocke, The Practical Test Pyramid).",
|
|
265
|
+
"hubWhen": {
|
|
266
|
+
"SHAPE": [
|
|
267
|
+
"pyramid"
|
|
268
|
+
]
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"id": "req-trophy",
|
|
273
|
+
"type": "requirement",
|
|
274
|
+
"label": "Integration tests use real services",
|
|
275
|
+
"x": 260,
|
|
276
|
+
"y": 520,
|
|
277
|
+
"ears_type": "ubiquitous",
|
|
278
|
+
"action": "test behaviour mostly through integration tests that run the element with its real database and broker in containers and fake only systems outside it, with integration tests at least 50% of the suite and 0 in-memory substitutes for the database",
|
|
279
|
+
"rationale": "For code that mostly glues a framework and a database together, the bugs live in the wiring; an in-memory substitute hides exactly those (Vocke, The Practical Test Pyramid: integration tests; Testcontainers).",
|
|
280
|
+
"hubWhen": {
|
|
281
|
+
"SHAPE": [
|
|
282
|
+
"trophy"
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"id": "req-own-data",
|
|
288
|
+
"type": "requirement",
|
|
289
|
+
"label": "Tests build their own data",
|
|
290
|
+
"x": 260,
|
|
291
|
+
"y": 650,
|
|
292
|
+
"ears_type": "ubiquitous",
|
|
293
|
+
"action": "create the data each test needs in the test itself with builders or factories, and leave nothing behind, so that the suite passes in random order and in parallel",
|
|
294
|
+
"rationale": "Tests sharing data depend on order and break each other, the most common cause of flaky suites (Fowler, Eradicating Non-Determinism in Tests: isolation).",
|
|
295
|
+
"hubWhen": {
|
|
296
|
+
"DATA": [
|
|
297
|
+
"synthetic"
|
|
298
|
+
]
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"id": "req-fixtures",
|
|
303
|
+
"type": "requirement",
|
|
304
|
+
"label": "Seed data is versioned",
|
|
305
|
+
"x": 260,
|
|
306
|
+
"y": 780,
|
|
307
|
+
"ears_type": "ubiquitous",
|
|
308
|
+
"action": "keep seed datasets in version control under test/seed, load them into a fresh database for each test run after the current migrations, and change them only through a reviewed pull request",
|
|
309
|
+
"rationale": "Shared data is safe when it is the same on every run and every change to it is visible; a database kept between runs drifts (Vocke, The Practical Test Pyramid).",
|
|
310
|
+
"hubWhen": {
|
|
311
|
+
"DATA": [
|
|
312
|
+
"fixtures"
|
|
313
|
+
]
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"id": "req-masking",
|
|
318
|
+
"type": "requirement",
|
|
319
|
+
"label": "No personal data in tests",
|
|
320
|
+
"x": 260,
|
|
321
|
+
"y": 910,
|
|
322
|
+
"ears_type": "event-driven",
|
|
323
|
+
"trigger": "a copy of production data is made for a test environment",
|
|
324
|
+
"action": "mask or replace every personal-data field before the copy leaves the production environment, so that 0 real names, e-mail addresses, phone numbers, addresses or payment details reach a test environment",
|
|
325
|
+
"rationale": "Test environments are less protected than production; personal data in them is a breach waiting to happen (GDPR Articles 25 and 32: data protection by design, security of processing).",
|
|
326
|
+
"hubWhen": {
|
|
327
|
+
"DATA": [
|
|
328
|
+
"masked"
|
|
329
|
+
]
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"id": "req-e2e-pr",
|
|
334
|
+
"type": "requirement",
|
|
335
|
+
"label": "Journeys tested before merge",
|
|
336
|
+
"x": 260,
|
|
337
|
+
"y": 1040,
|
|
338
|
+
"ears_type": "event-driven",
|
|
339
|
+
"trigger": "a pull request is opened or updated",
|
|
340
|
+
"action": "deploy it to an ephemeral environment, run the end-to-end tests of {{JOURNEYS}} there with 0 skipped, block the merge on a failure, and remove the environment when the pull request closes",
|
|
341
|
+
"rationale": "A broken journey is cheapest to fix before the merge; an environment per pull request keeps changes from waiting for a shared one (Vocke, The Practical Test Pyramid: end-to-end tests).",
|
|
342
|
+
"hubWhen": {
|
|
343
|
+
"E2E": [
|
|
344
|
+
"pipeline"
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"id": "req-e2e-staging",
|
|
350
|
+
"type": "requirement",
|
|
351
|
+
"label": "Journeys gate promotion",
|
|
352
|
+
"x": 260,
|
|
353
|
+
"y": 1170,
|
|
354
|
+
"ears_type": "event-driven",
|
|
355
|
+
"trigger": "a build is merged to the main branch",
|
|
356
|
+
"action": "deploy it to staging, run the end-to-end tests of {{JOURNEYS}} there with 0 skipped, and promote it to production only when all pass",
|
|
357
|
+
"rationale": "One shared environment is cheaper than one per change; the gate keeps a broken journey out of production (Humble and Farley, Continuous Delivery: the deployment pipeline).",
|
|
358
|
+
"hubWhen": {
|
|
359
|
+
"E2E": [
|
|
360
|
+
"staging"
|
|
361
|
+
]
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"id": "req-e2e-prod",
|
|
366
|
+
"type": "requirement",
|
|
367
|
+
"label": "Journeys checked in production",
|
|
368
|
+
"x": 260,
|
|
369
|
+
"y": 1300,
|
|
370
|
+
"ears_type": "event-driven",
|
|
371
|
+
"trigger": "a release reaches production",
|
|
372
|
+
"action": "run synthetic checks of {{JOURNEYS}} against it at once and every 5 minutes after, and roll the release back automatically when a check fails twice in a row",
|
|
373
|
+
"rationale": "With many deploys a day, production is the only environment where every journey can be proved; fast rollback bounds the harm of what slipped through (Sridharan, Testing in Production).",
|
|
374
|
+
"hubWhen": {
|
|
375
|
+
"E2E": [
|
|
376
|
+
"production"
|
|
377
|
+
]
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"id": "req-quarantine",
|
|
382
|
+
"type": "requirement",
|
|
383
|
+
"label": "Flaky tests quarantined",
|
|
384
|
+
"x": 260,
|
|
385
|
+
"y": 1430,
|
|
386
|
+
"ears_type": "unwanted-behaviour",
|
|
387
|
+
"unwanted_condition": "a test fails and then passes on the same commit",
|
|
388
|
+
"action": "list it in quarantine.json with an owner and a ticket within 1 working day, where it runs but no longer blocks merges, and fix or delete it within {{QUARANTINE_DAYS}} days",
|
|
389
|
+
"rationale": "A flaky test left in the gate teaches everyone to rerun until green; one left in quarantine forever is a deleted test nobody decided to delete (Fowler, Eradicating Non-Determinism in Tests: quarantine).",
|
|
390
|
+
"hubWhen": {
|
|
391
|
+
"FLAKY": [
|
|
392
|
+
"quarantine"
|
|
393
|
+
]
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"id": "req-no-retry",
|
|
398
|
+
"type": "requirement",
|
|
399
|
+
"label": "Flaky tests fail the build",
|
|
400
|
+
"x": 260,
|
|
401
|
+
"y": 1560,
|
|
402
|
+
"ears_type": "unwanted-behaviour",
|
|
403
|
+
"unwanted_condition": "a test fails and then passes on the same commit",
|
|
404
|
+
"action": "fail the build, naming the test as flaky, and merge nothing else to the main branch until it is fixed or deleted",
|
|
405
|
+
"rationale": "A small suite stays trustworthy only if every flake is treated as a defect at once (Fowler, Eradicating Non-Determinism in Tests).",
|
|
406
|
+
"hubWhen": {
|
|
407
|
+
"FLAKY": [
|
|
408
|
+
"zero"
|
|
409
|
+
]
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"id": "sc-pr-suite",
|
|
414
|
+
"type": "scenario",
|
|
415
|
+
"label": "Change is tested in time",
|
|
416
|
+
"x": 520,
|
|
417
|
+
"y": 0,
|
|
418
|
+
"given": "a pull request with a failing test",
|
|
419
|
+
"when": "it is pushed",
|
|
420
|
+
"then": "the test run reports the failure within {{PIPELINE_MINUTES}} minutes and the pull request cannot be merged"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"id": "sc-coverage",
|
|
424
|
+
"type": "scenario",
|
|
425
|
+
"label": "Uncovered code refused",
|
|
426
|
+
"x": 520,
|
|
427
|
+
"y": 130,
|
|
428
|
+
"given": "a pull request adding code",
|
|
429
|
+
"when": "its tests cover less than {{COVERAGE}}% of the new lines",
|
|
430
|
+
"then": "the quality gate fails and the pull request cannot be merged"
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"id": "sc-mutation",
|
|
434
|
+
"type": "scenario",
|
|
435
|
+
"label": "Weak tests refused",
|
|
436
|
+
"x": 520,
|
|
437
|
+
"y": 260,
|
|
438
|
+
"given": "a pull request whose tests run the new code but assert nothing about a condition",
|
|
439
|
+
"when": "mutation testing flips that condition",
|
|
440
|
+
"then": "the mutant survives, the score falls below {{MUTATION}}% and the merge is blocked",
|
|
441
|
+
"hubWhen": {
|
|
442
|
+
"GATE": [
|
|
443
|
+
"mutation"
|
|
444
|
+
]
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"id": "sc-pyramid",
|
|
449
|
+
"type": "scenario",
|
|
450
|
+
"label": "Unit test stays isolated",
|
|
451
|
+
"x": 520,
|
|
452
|
+
"y": 390,
|
|
453
|
+
"given": "the unit test suite with network access disabled",
|
|
454
|
+
"when": "it runs",
|
|
455
|
+
"then": "every test passes in under 100 ms, unit tests are at least 70% of all tests and end-to-end tests at most 10%",
|
|
456
|
+
"hubWhen": {
|
|
457
|
+
"SHAPE": [
|
|
458
|
+
"pyramid"
|
|
459
|
+
]
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"id": "sc-trophy",
|
|
464
|
+
"type": "scenario",
|
|
465
|
+
"label": "Real database in tests",
|
|
466
|
+
"x": 520,
|
|
467
|
+
"y": 520,
|
|
468
|
+
"given": "the test suite",
|
|
469
|
+
"when": "it runs",
|
|
470
|
+
"then": "the integration tests start the same database engine and version as production in a container, no test file imports an in-memory substitute, and integration tests are at least 50% of all tests",
|
|
471
|
+
"hubWhen": {
|
|
472
|
+
"SHAPE": [
|
|
473
|
+
"trophy"
|
|
474
|
+
]
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"id": "sc-own-data",
|
|
479
|
+
"type": "scenario",
|
|
480
|
+
"label": "Order does not matter",
|
|
481
|
+
"x": 520,
|
|
482
|
+
"y": 650,
|
|
483
|
+
"given": "the test suite",
|
|
484
|
+
"when": "it runs three times in random order with parallel workers",
|
|
485
|
+
"then": "all three runs pass",
|
|
486
|
+
"hubWhen": {
|
|
487
|
+
"DATA": [
|
|
488
|
+
"synthetic"
|
|
489
|
+
]
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"id": "sc-fixtures",
|
|
494
|
+
"type": "scenario",
|
|
495
|
+
"label": "Seed loads on fresh database",
|
|
496
|
+
"x": 520,
|
|
497
|
+
"y": 780,
|
|
498
|
+
"given": "the seed datasets and the current migrations",
|
|
499
|
+
"when": "a test run starts",
|
|
500
|
+
"then": "a fresh database is migrated, the seed loads without error, and the suite passes in random order",
|
|
501
|
+
"hubWhen": {
|
|
502
|
+
"DATA": [
|
|
503
|
+
"fixtures"
|
|
504
|
+
]
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
"id": "sc-masking",
|
|
509
|
+
"type": "scenario",
|
|
510
|
+
"label": "Copy carries no personal data",
|
|
511
|
+
"x": 520,
|
|
512
|
+
"y": 910,
|
|
513
|
+
"given": "a production snapshot",
|
|
514
|
+
"when": "it is copied to a test environment",
|
|
515
|
+
"then": "a scan of the copy finds 0 personal-data values, and the copy is refused otherwise",
|
|
516
|
+
"hubWhen": {
|
|
517
|
+
"DATA": [
|
|
518
|
+
"masked"
|
|
519
|
+
]
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"id": "sc-e2e-pr",
|
|
524
|
+
"type": "scenario",
|
|
525
|
+
"label": "Broken journey blocks merge",
|
|
526
|
+
"x": 520,
|
|
527
|
+
"y": 1040,
|
|
528
|
+
"given": "a pull request that breaks one of: {{JOURNEYS}}",
|
|
529
|
+
"when": "its ephemeral environment is tested",
|
|
530
|
+
"then": "the journey fails and the pull request cannot be merged",
|
|
531
|
+
"hubWhen": {
|
|
532
|
+
"E2E": [
|
|
533
|
+
"pipeline"
|
|
534
|
+
]
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"id": "sc-e2e-staging",
|
|
539
|
+
"type": "scenario",
|
|
540
|
+
"label": "Broken build not promoted",
|
|
541
|
+
"x": 520,
|
|
542
|
+
"y": 1170,
|
|
543
|
+
"given": "a merged build that breaks one of: {{JOURNEYS}}",
|
|
544
|
+
"when": "it is tested on staging",
|
|
545
|
+
"then": "it is not promoted to production and the team is told",
|
|
546
|
+
"hubWhen": {
|
|
547
|
+
"E2E": [
|
|
548
|
+
"staging"
|
|
549
|
+
]
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
"id": "sc-e2e-prod",
|
|
554
|
+
"type": "scenario",
|
|
555
|
+
"label": "Failing journey rolls back",
|
|
556
|
+
"x": 520,
|
|
557
|
+
"y": 1300,
|
|
558
|
+
"given": "a release that breaks one of: {{JOURNEYS}}",
|
|
559
|
+
"when": "the synthetic check fails twice in a row",
|
|
560
|
+
"then": "the rollback webhook is called and the team is alerted",
|
|
561
|
+
"hubWhen": {
|
|
562
|
+
"E2E": [
|
|
563
|
+
"production"
|
|
564
|
+
]
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"id": "sc-quarantine",
|
|
569
|
+
"type": "scenario",
|
|
570
|
+
"label": "Flaky test leaves the gate",
|
|
571
|
+
"x": 520,
|
|
572
|
+
"y": 1430,
|
|
573
|
+
"given": "a test that fails and then passes on the same commit",
|
|
574
|
+
"when": "the nightly run reports it as flaky",
|
|
575
|
+
"then": "the run fails until the test is in quarantine.json with an owner, and after {{QUARANTINE_DAYS}} days it is fixed or deleted",
|
|
576
|
+
"hubWhen": {
|
|
577
|
+
"FLAKY": [
|
|
578
|
+
"quarantine"
|
|
579
|
+
]
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"id": "sc-no-retry",
|
|
584
|
+
"type": "scenario",
|
|
585
|
+
"label": "Flaky test stops the line",
|
|
586
|
+
"x": 520,
|
|
587
|
+
"y": 1560,
|
|
588
|
+
"given": "a test that fails and then passes on the same commit",
|
|
589
|
+
"when": "the build runs",
|
|
590
|
+
"then": "the build fails naming the test as flaky",
|
|
591
|
+
"hubWhen": {
|
|
592
|
+
"FLAKY": [
|
|
593
|
+
"zero"
|
|
594
|
+
]
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
"id": "adr-pyramid",
|
|
599
|
+
"type": "adr",
|
|
600
|
+
"label": "A test pyramid",
|
|
601
|
+
"x": 780,
|
|
602
|
+
"y": 0,
|
|
603
|
+
"concern": "test-strategy",
|
|
604
|
+
"status": "accepted",
|
|
605
|
+
"date": "",
|
|
606
|
+
"context": "Code lives in this element and changes every week; the tests decide whether a change can be released with confidence or only with hope. The forces: fast tests give feedback in minutes but exercise little of the wiring, while end-to-end tests exercise everything but are slow, brittle and late; coverage shows what was run, not what was checked; tests that share data or depend on order fail at random, and a suite that fails at random is soon ignored; copies of production data make realistic tests but carry personal data; and a test that fails only sometimes teaches everyone to rerun until green. Contract tests between the system's parts and with outside callers are decided in the Communication style and API evolution packs.",
|
|
607
|
+
"decision": "Tests follow the pyramid: most are unit tests of the domain logic under test/unit, run with Vitest without network or database (JUnit 5 on the JVM); integration tests under test/integration cover each adapter against the real dependency in a container (Testcontainers); a few end-to-end tests cover {{JOURNEYS}} (Playwright). Every pull request runs unit and integration tests within {{PIPELINE_MINUTES}} minutes. Gate: {{GATE}}, measured in the SonarQube quality gate on new code; mutation testing with Stryker (PIT on the JVM). Test data: {{DATA}}. End-to-end tests run in {{E2E}}. Flaky tests: {{FLAKY}}.",
|
|
608
|
+
"consequences": "• Fast, precise feedback: a failing unit test names the rule that broke.\n• Refactoring that changes internal interfaces rewrites many unit tests; test behaviour, not methods, to limit it.\n• Wiring bugs (configuration, queries, serialisation) are caught only by the thinner integration layer.\n• Requires code where the logic can be called without infrastructure.\n• The gate costs build time in proportion to what it proves: coverage is free, a mutation score adds minutes.\n• Where the end-to-end tests run decides what they can stop: before the merge, before production, or only after.",
|
|
609
|
+
"alternatives": "1. A testing trophy: mostly integration tests, better for glue code, slower feedback.\n2. An ice-cream cone of manual and end-to-end tests: slow, brittle and late; the shape to move away from.",
|
|
610
|
+
"hubWhen": {
|
|
611
|
+
"SHAPE": [
|
|
612
|
+
"pyramid"
|
|
613
|
+
]
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"id": "adr-trophy",
|
|
618
|
+
"type": "adr",
|
|
619
|
+
"label": "A testing trophy",
|
|
620
|
+
"x": 780,
|
|
621
|
+
"y": 130,
|
|
622
|
+
"concern": "test-strategy",
|
|
623
|
+
"status": "accepted",
|
|
624
|
+
"date": "",
|
|
625
|
+
"context": "Code lives in this element and changes every week; the tests decide whether a change can be released with confidence or only with hope. The forces: fast tests give feedback in minutes but exercise little of the wiring, while end-to-end tests exercise everything but are slow, brittle and late; coverage shows what was run, not what was checked; tests that share data or depend on order fail at random, and a suite that fails at random is soon ignored; copies of production data make realistic tests but carry personal data; and a test that fails only sometimes teaches everyone to rerun until green. Contract tests between the system's parts and with outside callers are decided in the Communication style and API evolution packs.",
|
|
626
|
+
"decision": "Most tests are integration tests under test/integration that run the element through its public interface (HTTP or the UI component tree) with its real database and broker started by Testcontainers, faking only systems outside it (MSW or WireMock); static analysis (TypeScript strict, ESLint and SonarQube) and a few unit tests under test/unit for pure logic sit below; a few end-to-end tests cover {{JOURNEYS}} with Playwright. Every pull request runs them within {{PIPELINE_MINUTES}} minutes. Gate: {{GATE}}, in the SonarQube quality gate on new code. Test data: {{DATA}}. End-to-end tests run in {{E2E}}. Flaky tests: {{FLAKY}}. In-memory substitutes for the database (pg-mem, SQLite for PostgreSQL, H2) are not used.",
|
|
627
|
+
"consequences": "• Tests survive refactoring because they use the element as its callers do.\n• Wiring, queries and serialisation are tested for real.\n• Slower than unit tests: containers start once per run and tests must clean up; keeping the run under {{PIPELINE_MINUTES}} minutes needs parallel workers.\n• A failing test says which behaviour broke, not which line; debugging takes longer.\n• The gate costs build time in proportion to what it proves: coverage is free, a mutation score adds minutes.\n• Where the end-to-end tests run decides what they can stop: before the merge, before production, or only after.",
|
|
628
|
+
"alternatives": "1. A test pyramid: faster and more precise where there is real domain logic.\n2. In-memory database substitutes: faster, but they differ from the real engine exactly where bugs hide.",
|
|
629
|
+
"hubWhen": {
|
|
630
|
+
"SHAPE": [
|
|
631
|
+
"trophy"
|
|
632
|
+
]
|
|
633
|
+
}
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"id": "ff-pr-time",
|
|
637
|
+
"type": "fitness-fn",
|
|
638
|
+
"label": "Pull-request tests in time",
|
|
639
|
+
"x": 1040,
|
|
640
|
+
"y": 0,
|
|
641
|
+
"characteristic": "maintainability",
|
|
642
|
+
"scope": "atomic",
|
|
643
|
+
"cadence": "triggered",
|
|
644
|
+
"trigger": "pull-request",
|
|
645
|
+
"invocation": "automated",
|
|
646
|
+
"description": "The test job has a hard timeout of {{PIPELINE_MINUTES}} minutes, so a slow suite fails instead of quietly growing; it is listed among the checks the main branch requires, in the ruleset the Code review and branching pack keeps.\n\nThreshold: The pull-request test job finishes within {{PIPELINE_MINUTES}} minutes\n\nTool: GitHub Actions (timeout-minutes) with Vitest; for the JVM: the same job running ./gradlew test\n\n```yaml\n# .github/workflows/test.yml\nname: test\non: [pull_request]\njobs:\n test:\n runs-on: ubuntu-latest\n timeout-minutes: {{PIPELINE_MINUTES}}\n steps:\n - uses: actions/checkout@v4.2.2 # pin by commit SHA in your repository\n - uses: actions/setup-node@v4.1.0 # pin by commit SHA in your repository\n with: { node-version-file: .nvmrc, cache: npm }\n - run: npm ci\n - run: npx vitest run --project unit --reporter=junit --outputFile=reports/unit.xml\n - run: npx vitest run --project integration --reporter=junit --outputFile=reports/integration.xml\n```"
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
"id": "ff-coverage",
|
|
650
|
+
"type": "fitness-fn",
|
|
651
|
+
"label": "Coverage of new code",
|
|
652
|
+
"x": 1040,
|
|
653
|
+
"y": 130,
|
|
654
|
+
"characteristic": "maintainability",
|
|
655
|
+
"scope": "atomic",
|
|
656
|
+
"cadence": "triggered",
|
|
657
|
+
"trigger": "pull-request",
|
|
658
|
+
"invocation": "automated",
|
|
659
|
+
"description": "The pipeline sends the coverage report to SonarQube and waits for the quality gate, whose condition \"Coverage on New Code is less than {{COVERAGE}}%\" is created once through the Web API, not in the properties file.\n\nThreshold: Coverage on new code at least {{COVERAGE}}%; the quality gate fails the pull request below it\n\nTool: SonarQube quality gate (sonar-scanner with sonar.qualitygate.wait, the condition through api/qualitygates/create_condition; SonarQube Cloud takes gateId and organization instead of gateName); for the JVM: the same with the JaCoCo report path\n\n```bash\n# sonar-project.properties, in the repository:\n# sonar.projectKey=shop-order-api\n# sonar.sources=src\n# sonar.tests=test\n# sonar.javascript.lcov.reportPaths=coverage/lcov.info\n# sonar.newCode.referenceBranch=main\n# sonar.qualitygate.wait=true\n# the gate's condition, created once (SonarQube Server; needs the Administer Quality Gates permission):\ncurl -fsS -u \"$SONAR_TOKEN:\" -X POST \"$SONAR_HOST_URL/api/qualitygates/create_condition\" \\\n --data-urlencode \"gateName=Shop\" --data-urlencode \"metric=new_coverage\" \\\n --data-urlencode \"op=LT\" --data-urlencode \"error={{COVERAGE}}\"\n```"
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
"id": "ff-mutation",
|
|
663
|
+
"type": "fitness-fn",
|
|
664
|
+
"label": "Mutation score on changed files",
|
|
665
|
+
"x": 1040,
|
|
666
|
+
"y": 260,
|
|
667
|
+
"characteristic": "maintainability",
|
|
668
|
+
"scope": "atomic",
|
|
669
|
+
"cadence": "triggered",
|
|
670
|
+
"trigger": "pull-request",
|
|
671
|
+
"invocation": "automated",
|
|
672
|
+
"description": "Stryker runs incrementally over the source files the pull request changes (the mutate globs come from git diff) and breaks the build when the score falls below the threshold. On the JVM, PIT with mutationThreshold and the git-based scm goal does the same.\n\nThreshold: Mutation score on the files the pull request changes at least {{MUTATION}}%; the build breaks below it\n\nTool: Stryker Mutator (@stryker-mutator/vitest-runner); for the JVM: PIT with pitest-maven's scmMutationCoverage goal\n\n```bash\n# stryker.config.json, in the repository:\n# { \"testRunner\": \"vitest\", \"incremental\": true, \"reporters\": [\"clear-text\", \"html\", \"json\"],\n# \"thresholds\": { \"high\": 85, \"low\": 75, \"break\": {{MUTATION}} } }\nchanged=$(git diff --name-only origin/main...HEAD -- 'src/**/*.ts' | grep -v '\\.test\\.ts$' | paste -sd, -)\n[ -z \"$changed\" ] || npx stryker run --mutate \"$changed\"\n```",
|
|
673
|
+
"hubWhen": {
|
|
674
|
+
"GATE": [
|
|
675
|
+
"mutation"
|
|
676
|
+
]
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
"id": "ff-unit-isolated",
|
|
681
|
+
"type": "fitness-fn",
|
|
682
|
+
"label": "Unit tests stay isolated and few are end-to-end",
|
|
683
|
+
"x": 1040,
|
|
684
|
+
"y": 390,
|
|
685
|
+
"characteristic": "maintainability",
|
|
686
|
+
"scope": "atomic",
|
|
687
|
+
"cadence": "triggered",
|
|
688
|
+
"trigger": "pull-request",
|
|
689
|
+
"invocation": "automated",
|
|
690
|
+
"description": "The unit-test project disables network connections in its setup, so a unit test that reaches a server fails; a step in CI reads the JUnit reports, counts tests per suite and fails when the shares are off or a unit test took more than 100 ms.\n\nThreshold: 0 unit tests reach the network or run over 100 ms; unit tests at least 70% and end-to-end tests at most 10% of all tests\n\nTool: Vitest with nock 14 or later (which intercepts native fetch too) and xmllint over the JUnit reports; for the JVM: JUnit 5 with a SecurityManager-free network block through a test ArchUnit rule and the same report arithmetic\n\n```ts\n// test/unit/setup.ts (vitest.config.ts: test.setupFiles of the unit project)\nimport nock from 'nock'\nimport { afterAll, beforeAll } from 'vitest'\n\nbeforeAll(() => nock.disableNetConnect()) // any real HTTP call throws\nafterAll(() => nock.enableNetConnect())\n\n// CI, from the JUnit reports reports/unit.xml, reports/integration.xml, reports/e2e.xml:\n// count() { xmllint --xpath 'string(sum(//testsuite/@tests))' \"$1\"; }\n// unit=$(count reports/unit.xml); e2e=$(count reports/e2e.xml); all=$((unit + $(count reports/integration.xml) + e2e))\n// [ $((unit * 100 / all)) -ge 70 ] && [ $((e2e * 100 / all)) -le 10 ]\n// [ \"$(xmllint --xpath 'count(//testcase[@time > 0.1])' reports/unit.xml)\" = 0 ] # no unit test over 100 ms\n```",
|
|
691
|
+
"hubWhen": {
|
|
692
|
+
"SHAPE": [
|
|
693
|
+
"pyramid"
|
|
694
|
+
]
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
"id": "ff-no-fakes",
|
|
699
|
+
"type": "fitness-fn",
|
|
700
|
+
"label": "No in-memory database",
|
|
701
|
+
"x": 1040,
|
|
702
|
+
"y": 520,
|
|
703
|
+
"characteristic": "maintainability",
|
|
704
|
+
"scope": "atomic",
|
|
705
|
+
"cadence": "triggered",
|
|
706
|
+
"trigger": "pull-request",
|
|
707
|
+
"invocation": "automated",
|
|
708
|
+
"description": "A dependency rule fails the build when a file under test or src imports an in-memory substitute for the database (helpers included, not only the test files); the integration tests use Testcontainers with the production engine and version.\n\nThreshold: 0 test or test-helper files import an in-memory database substitute\n\nTool: dependency-cruiser; for the JVM: an ArchUnit rule forbidding org.h2 in test classes\n\n```js\n// .dependency-cruiser.cjs\nmodule.exports = {\n forbidden: [{\n name: 'no-in-memory-database',\n comment: 'ADR Testing trophy: integration tests use the real engine (Testcontainers)',\n severity: 'error',\n from: { path: '^(test|src)/' },\n to: { path: '^node_modules/(pg-mem|sqlite3|better-sqlite3|mongodb-memory-server)/' },\n }],\n options: { tsConfig: { fileName: 'tsconfig.json' } },\n}\n```",
|
|
709
|
+
"hubWhen": {
|
|
710
|
+
"SHAPE": [
|
|
711
|
+
"trophy"
|
|
712
|
+
]
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
"id": "ff-integration-share",
|
|
717
|
+
"type": "fitness-fn",
|
|
718
|
+
"label": "Integration tests carry the suite",
|
|
719
|
+
"x": 1040,
|
|
720
|
+
"y": 650,
|
|
721
|
+
"characteristic": "maintainability",
|
|
722
|
+
"scope": "atomic",
|
|
723
|
+
"cadence": "triggered",
|
|
724
|
+
"trigger": "pull-request",
|
|
725
|
+
"invocation": "automated",
|
|
726
|
+
"description": "A step in CI reads the JUnit reports of the unit, integration and end-to-end runs, counts the tests per suite and fails when integration tests are below half of the total.\n\nThreshold: Integration tests at least 50% of all tests\n\nTool: xmllint over the JUnit reports in a shell step; for the JVM: the same over the surefire and failsafe reports\n\n```bash\nset -euo pipefail\ncount() { xmllint --xpath 'string(sum(//testsuite/@tests))' \"$1\"; }\nintegration=$(count reports/integration.xml)\nall=$(( $(count reports/unit.xml) + integration + $(count reports/e2e.xml) ))\necho \"integration tests: $integration of $all\"\n[ $((integration * 100 / all)) -ge 50 ] || { echo \"integration tests are below half of the suite (ADR A testing trophy)\"; exit 1; }\n```",
|
|
727
|
+
"hubWhen": {
|
|
728
|
+
"SHAPE": [
|
|
729
|
+
"trophy"
|
|
730
|
+
]
|
|
731
|
+
}
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"id": "ff-shuffle",
|
|
735
|
+
"type": "fitness-fn",
|
|
736
|
+
"label": "Tests pass in any order",
|
|
737
|
+
"x": 1040,
|
|
738
|
+
"y": 780,
|
|
739
|
+
"characteristic": "maintainability",
|
|
740
|
+
"scope": "atomic",
|
|
741
|
+
"cadence": "triggered",
|
|
742
|
+
"trigger": "nightly",
|
|
743
|
+
"invocation": "automated",
|
|
744
|
+
"description": "A nightly job runs the suite three times with shuffled order and a different seed each time; a failure prints the seed, so the order can be reproduced.\n\nThreshold: The suite passes in 3 consecutive runs with random order and parallel workers\n\nTool: Vitest (sequence.shuffle); for the JVM: JUnit 5 with junit.jupiter.testmethod.order.default set to MethodOrderer$Random; for Python: pytest-randomly\n\n```ts\n// vitest.config.ts\nimport { defineConfig } from 'vitest/config'\nexport default defineConfig({\n test: {\n sequence: { shuffle: true }, // files and tests in random order\n pool: 'threads',\n },\n})\n// nightly: for run in 1 2 3; do npx vitest run --sequence.seed=$RANDOM || exit 1; done\n```",
|
|
745
|
+
"hubWhen": {
|
|
746
|
+
"DATA": [
|
|
747
|
+
"synthetic",
|
|
748
|
+
"fixtures"
|
|
749
|
+
]
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"id": "ff-seed-loads",
|
|
754
|
+
"type": "fitness-fn",
|
|
755
|
+
"label": "Seed loads on a fresh database",
|
|
756
|
+
"x": 1040,
|
|
757
|
+
"y": 910,
|
|
758
|
+
"characteristic": "maintainability",
|
|
759
|
+
"scope": "atomic",
|
|
760
|
+
"cadence": "triggered",
|
|
761
|
+
"trigger": "pull-request",
|
|
762
|
+
"invocation": "automated",
|
|
763
|
+
"description": "Vitest's global setup starts PostgreSQL in a container, runs the migrations and loads every seed file; a seed that no longer fits the schema fails the setup and with it the run, so the seed cannot drift from the migrations.\n\nThreshold: Every test run starts from a fresh database with the current migrations and the seed under test/seed loaded without error\n\nTool: Vitest globalSetup with Testcontainers (@testcontainers/postgresql) and pg; for the JVM: a Testcontainers JDBC URL with an init script\n\n```ts\n// test/globalSetup.ts (vitest.config.ts: test.globalSetup) — a fresh, migrated database with the seed loaded, for every run\nimport { execFileSync } from 'node:child_process'\nimport { readdirSync, readFileSync } from 'node:fs'\nimport { PostgreSqlContainer, type StartedPostgreSqlContainer } from '@testcontainers/postgresql'\nimport pg from 'pg'\n\nlet container: StartedPostgreSqlContainer\n\nexport async function setup() {\n container = await new PostgreSqlContainer('postgres:17').start()\n process.env.DATABASE_URL = container.getConnectionUri()\n execFileSync('npm', ['run', 'migrate'], { stdio: 'inherit', env: process.env }) // the current migrations\n const client = new pg.Client({ connectionString: process.env.DATABASE_URL })\n await client.connect()\n for (const file of readdirSync('test/seed').filter((f) => f.endsWith('.sql')).sort())\n await client.query(readFileSync(`test/seed/${file}`, 'utf8')) // the seed, changed only through reviewed pull requests\n await client.end()\n}\n\nexport async function teardown() {\n await container.stop()\n}\n```",
|
|
764
|
+
"hubWhen": {
|
|
765
|
+
"DATA": [
|
|
766
|
+
"fixtures"
|
|
767
|
+
]
|
|
768
|
+
}
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"id": "ff-pii-scan",
|
|
772
|
+
"type": "fitness-fn",
|
|
773
|
+
"label": "Test copies hold no personal data",
|
|
774
|
+
"x": 1040,
|
|
775
|
+
"y": 1040,
|
|
776
|
+
"characteristic": "security",
|
|
777
|
+
"scope": "atomic",
|
|
778
|
+
"cadence": "triggered",
|
|
779
|
+
"trigger": "release",
|
|
780
|
+
"invocation": "automated",
|
|
781
|
+
"description": "Before a masked copy is released, a job samples every text column and runs Presidio's analyzer over it; any finding stops the release of the copy.\n\nThreshold: 0 personal-data findings in a sample of 10,000 rows per table of each copy; a copy with findings is not released to test environments\n\nTool: Microsoft Presidio (presidio-analyzer) in a Python job of the copy pipeline\n\n```python\nfrom presidio_analyzer import AnalyzerEngine\nanalyzer = AnalyzerEngine()\nENTITIES = [\"PERSON\", \"EMAIL_ADDRESS\", \"PHONE_NUMBER\", \"IBAN_CODE\", \"CREDIT_CARD\", \"LOCATION\"]\n\ndef findings(rows):\n for table, column, value in rows: # sampled text columns of the copy\n for hit in analyzer.analyze(text=str(value), entities=ENTITIES, language=\"en\"):\n if hit.score >= 0.6:\n yield table, column, hit.entity_type\n\nhits = list(findings(sample_rows(limit_per_table=10_000)))\nassert not hits, f\"personal data in the test copy: {hits[:20]}\"\n```",
|
|
782
|
+
"hubWhen": {
|
|
783
|
+
"DATA": [
|
|
784
|
+
"masked"
|
|
785
|
+
]
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
"id": "ff-journeys-covered",
|
|
790
|
+
"type": "fitness-fn",
|
|
791
|
+
"label": "Every journey has a test",
|
|
792
|
+
"x": 1040,
|
|
793
|
+
"y": 1170,
|
|
794
|
+
"characteristic": "maintainability",
|
|
795
|
+
"scope": "atomic",
|
|
796
|
+
"cadence": "triggered",
|
|
797
|
+
"trigger": "pull-request",
|
|
798
|
+
"invocation": "automated",
|
|
799
|
+
"description": "A test lists the journeys the decision names and expects a spec file e2e/<journey>.spec.ts for each (spaces in a journey's name become dashes); a journey without a spec fails the test, so the list and the suite cannot drift apart.\n\nThreshold: 100% of the journeys {{JOURNEYS}} have a Playwright spec under e2e\n\nTool: Vitest over the e2e directory; for the JVM: the same test with JUnit 5 over src/e2e\n\n```ts\nimport { existsSync } from 'node:fs'\nimport { expect, it } from 'vitest'\n\nconst JOURNEYS = '{{JOURNEYS}}'.split(/,\\s*/).map((j) => j.trim().toLowerCase().replace(/\\s+/g, '-'))\n\nit.each(JOURNEYS)('journey %s has an end-to-end spec', (journey) => {\n expect(existsSync(`e2e/${journey}.spec.ts`), `e2e/${journey}.spec.ts is missing`).toBe(true)\n})\n```"
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
"id": "ff-e2e-gate",
|
|
803
|
+
"type": "fitness-fn",
|
|
804
|
+
"label": "Journeys gate the release",
|
|
805
|
+
"x": 1040,
|
|
806
|
+
"y": 1300,
|
|
807
|
+
"characteristic": "functional-suitability",
|
|
808
|
+
"scope": "holistic",
|
|
809
|
+
"cadence": "triggered",
|
|
810
|
+
"trigger": "pull-request",
|
|
811
|
+
"invocation": "automated",
|
|
812
|
+
"description": "Playwright runs the journeys against the environment the pipeline deployed (an ephemeral one per pull request, or staging after the merge) with no retries and no test.only; a CI step reads the JUnit report and fails on a skipped test. The job is a required check for the merge, or the gate of the promotion.\n\nThreshold: All end-to-end tests pass before the build is merged or promoted, with 0 skipped\n\nTool: Playwright (junit reporter) with xmllint in a shell step; for the JVM: Playwright for Java with the same report\n\n```ts\n// playwright.config.ts\nimport { defineConfig } from '@playwright/test'\nexport default defineConfig({\n testDir: 'e2e',\n forbidOnly: true, // no test.only left in the gate\n retries: 0,\n reporter: [['junit', { outputFile: 'reports/e2e.xml' }]],\n use: { baseURL: process.env.E2E_BASE_URL, trace: 'retain-on-failure' },\n})\n// CI, after npx playwright test:\n// [ \"$(xmllint --xpath 'string(//testsuites/@skipped)' reports/e2e.xml)\" = 0 ] || { echo \"skipped end-to-end tests\"; exit 1; }\n```",
|
|
813
|
+
"hubWhen": {
|
|
814
|
+
"E2E": [
|
|
815
|
+
"pipeline",
|
|
816
|
+
"staging"
|
|
817
|
+
]
|
|
818
|
+
}
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
"id": "ff-synthetic",
|
|
822
|
+
"type": "fitness-fn",
|
|
823
|
+
"label": "Journeys checked in production",
|
|
824
|
+
"x": 1040,
|
|
825
|
+
"y": 1430,
|
|
826
|
+
"characteristic": "reliability",
|
|
827
|
+
"scope": "holistic",
|
|
828
|
+
"cadence": "continual",
|
|
829
|
+
"invocation": "automated",
|
|
830
|
+
"description": "The Playwright journeys run as Checkly browser checks, one per journey, every 5 minutes from two locations; the escalation policy alerts after two failed runs in a row and the alert channel is a webhook on the deployment pipeline that rolls the release back. The deploy job deploys the checks and triggers them against the new release at once.\n\nThreshold: Each journey runs after every deploy and every 5 minutes from 2 locations; 2 failed runs in a row call the rollback webhook\n\nTool: Checkly CLI (checkly/constructs; npx checkly deploy and npx checkly trigger in the deploy job)\n\n```ts\n// checkly/checkout.check.ts — one BrowserCheck per journey of: {{JOURNEYS}}\nimport { AlertEscalationBuilder, BrowserCheck, Frequency, WebhookAlertChannel } from 'checkly/constructs'\n\nconst rollback = new WebhookAlertChannel('rollback-webhook', {\n name: 'Roll back the release',\n url: process.env.ROLLBACK_WEBHOOK_URL!, // the deployment pipeline's rollback endpoint\n method: 'POST',\n})\n\nnew BrowserCheck('checkout-journey', {\n name: 'Checkout journey',\n frequency: Frequency.EVERY_5M,\n locations: ['eu-west-1', 'eu-central-1'],\n code: { entrypoint: '../e2e/checkout.spec.ts' },\n alertChannels: [rollback],\n alertEscalationPolicy: AlertEscalationBuilder.runBasedEscalation(2), // two failed runs in a row alert, and the webhook rolls back\n})\n// deploy job, after the deploy: npx checkly deploy && npx checkly trigger (runs the checks against the new release at once)\n```",
|
|
831
|
+
"hubWhen": {
|
|
832
|
+
"E2E": [
|
|
833
|
+
"production"
|
|
834
|
+
]
|
|
835
|
+
}
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"id": "ff-flaky-report",
|
|
839
|
+
"type": "fitness-fn",
|
|
840
|
+
"label": "Flaky tests enter quarantine",
|
|
841
|
+
"x": 1040,
|
|
842
|
+
"y": 1560,
|
|
843
|
+
"characteristic": "maintainability",
|
|
844
|
+
"scope": "atomic",
|
|
845
|
+
"cadence": "triggered",
|
|
846
|
+
"trigger": "nightly",
|
|
847
|
+
"invocation": "automated",
|
|
848
|
+
"description": "The nightly run retries a failed test once, only to tell a flake from a failure; a reporter lists the tests that passed on retry in reports/flaky.json and fails the run for any that is not yet in quarantine.json, so a flake is entered within a day or the nightly stays red. The gate itself skips the tests tagged @quarantine.\n\nThreshold: 0 tests that passed only on retry in the nightly run without an entry in quarantine.json\n\nTool: Vitest (retry: 1 with a custom reporter reading each test's diagnostic().flaky); for the JVM: Gradle's test-retry plugin with failOnPassedAfterRetry off and its flaky report\n\n```ts\n// test/flakyReporter.ts (nightly vitest.config.ts: test.retry = 1, test.reporters = ['default', new FlakyReporter()])\nimport { writeFileSync } from 'node:fs'\nimport type { Reporter, TestModule } from 'vitest/node'\nimport quarantine from '../quarantine.json' // [{ \"test\": \"...\", \"owner\": \"...\", \"ticket\": \"...\", \"since\": \"2026-10-01\" }]\n\nexport class FlakyReporter implements Reporter {\n onTestRunEnd(modules: ReadonlyArray<TestModule>) {\n const flaky = modules.flatMap((m) => [...m.children.allTests()]).filter((t) => t.diagnostic()?.flaky).map((t) => t.fullName)\n writeFileSync('reports/flaky.json', JSON.stringify(flaky, null, 2))\n const unquarantined = flaky.filter((name) => !quarantine.some((q) => q.test === name))\n if (unquarantined.length) {\n console.error('flaky tests not yet in quarantine (list them within 1 working day):\\n' + unquarantined.join('\\n'))\n process.exitCode = 1\n }\n }\n}\n```",
|
|
849
|
+
"hubWhen": {
|
|
850
|
+
"FLAKY": [
|
|
851
|
+
"quarantine"
|
|
852
|
+
]
|
|
853
|
+
}
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
"id": "ff-quarantine",
|
|
857
|
+
"type": "fitness-fn",
|
|
858
|
+
"label": "Quarantine is emptied",
|
|
859
|
+
"x": 1040,
|
|
860
|
+
"y": 1690,
|
|
861
|
+
"characteristic": "maintainability",
|
|
862
|
+
"scope": "atomic",
|
|
863
|
+
"cadence": "triggered",
|
|
864
|
+
"trigger": "pull-request",
|
|
865
|
+
"invocation": "automated",
|
|
866
|
+
"description": "Quarantined tests are listed in quarantine.json and tagged @quarantine, which the gate skips and a separate non-blocking job runs. A test over the list fails the build when an entry is older than the deadline or has no owner or ticket.\n\nThreshold: 0 tests in quarantine for more than {{QUARANTINE_DAYS}} days; every entry has an owner and a ticket\n\nTool: Vitest (a test over quarantine.json); for the JVM: the same test with JUnit 5 over the file\n\n```ts\nimport { expect, it } from 'vitest'\nimport quarantine from '../quarantine.json' // [{ \"test\": \"...\", \"owner\": \"...\", \"ticket\": \"...\", \"since\": \"2026-10-01\" }]\n\nconst MAX_DAYS = {{QUARANTINE_DAYS}}\n\nit('no test stays in quarantine past the deadline', () => {\n const overdue = quarantine.filter((q) =>\n !q.owner || !q.ticket || (Date.now() - Date.parse(q.since)) / 86_400_000 > MAX_DAYS)\n expect(overdue).toEqual([])\n})\n```",
|
|
867
|
+
"hubWhen": {
|
|
868
|
+
"FLAKY": [
|
|
869
|
+
"quarantine"
|
|
870
|
+
]
|
|
871
|
+
}
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
"id": "ff-flaky-fails",
|
|
875
|
+
"type": "fitness-fn",
|
|
876
|
+
"label": "Flaky tests fail the build",
|
|
877
|
+
"x": 1040,
|
|
878
|
+
"y": 1820,
|
|
879
|
+
"characteristic": "maintainability",
|
|
880
|
+
"scope": "atomic",
|
|
881
|
+
"cadence": "triggered",
|
|
882
|
+
"trigger": "pull-request",
|
|
883
|
+
"invocation": "automated",
|
|
884
|
+
"description": "The run retries a failed test once, only to tell a flake from a real failure; a reporter fails the build when any test passed on retry and names it as flaky.\n\nThreshold: 0 tests that pass only on retry; such a test fails the build\n\nTool: Vitest (retry: 1 with a custom reporter reading each test's diagnostic().flaky); for the JVM: Gradle's test-retry plugin with failOnPassedAfterRetry\n\n```ts\n// test/flakyReporter.ts (vitest.config.ts: test.retry = 1, test.reporters = ['default', new FlakyReporter()])\nimport type { Reporter, TestModule } from 'vitest/node'\n\nexport class FlakyReporter implements Reporter {\n onTestRunEnd(modules: ReadonlyArray<TestModule>) {\n const flaky = modules.flatMap((m) => [...m.children.allTests()]).filter((t) => t.diagnostic()?.flaky).map((t) => t.fullName)\n if (flaky.length) {\n console.error('flaky tests (passed only on retry); fix or delete them before merging anything else:\\n' + flaky.join('\\n'))\n process.exitCode = 1\n }\n }\n}\n```",
|
|
885
|
+
"hubWhen": {
|
|
886
|
+
"FLAKY": [
|
|
887
|
+
"zero"
|
|
888
|
+
]
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
],
|
|
892
|
+
"relations": [
|
|
893
|
+
{
|
|
894
|
+
"id": "req-pr-suite--derives--need",
|
|
895
|
+
"sourceId": "req-pr-suite",
|
|
896
|
+
"targetId": "need",
|
|
897
|
+
"relationType": "derives"
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
"id": "req-coverage--derives--need",
|
|
901
|
+
"sourceId": "req-coverage",
|
|
902
|
+
"targetId": "need",
|
|
903
|
+
"relationType": "derives"
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
"id": "req-mutation--derives--need",
|
|
907
|
+
"sourceId": "req-mutation",
|
|
908
|
+
"targetId": "need",
|
|
909
|
+
"relationType": "derives"
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
"id": "req-pyramid--derives--need",
|
|
913
|
+
"sourceId": "req-pyramid",
|
|
914
|
+
"targetId": "need",
|
|
915
|
+
"relationType": "derives"
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
"id": "req-trophy--derives--need",
|
|
919
|
+
"sourceId": "req-trophy",
|
|
920
|
+
"targetId": "need",
|
|
921
|
+
"relationType": "derives"
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
"id": "req-own-data--derives--need",
|
|
925
|
+
"sourceId": "req-own-data",
|
|
926
|
+
"targetId": "need",
|
|
927
|
+
"relationType": "derives"
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
"id": "req-fixtures--derives--need",
|
|
931
|
+
"sourceId": "req-fixtures",
|
|
932
|
+
"targetId": "need",
|
|
933
|
+
"relationType": "derives"
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
"id": "req-masking--derives--need",
|
|
937
|
+
"sourceId": "req-masking",
|
|
938
|
+
"targetId": "need",
|
|
939
|
+
"relationType": "derives"
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
"id": "req-e2e-pr--derives--need",
|
|
943
|
+
"sourceId": "req-e2e-pr",
|
|
944
|
+
"targetId": "need",
|
|
945
|
+
"relationType": "derives"
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
"id": "req-e2e-staging--derives--need",
|
|
949
|
+
"sourceId": "req-e2e-staging",
|
|
950
|
+
"targetId": "need",
|
|
951
|
+
"relationType": "derives"
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
"id": "req-e2e-prod--derives--need",
|
|
955
|
+
"sourceId": "req-e2e-prod",
|
|
956
|
+
"targetId": "need",
|
|
957
|
+
"relationType": "derives"
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
"id": "req-quarantine--derives--need",
|
|
961
|
+
"sourceId": "req-quarantine",
|
|
962
|
+
"targetId": "need",
|
|
963
|
+
"relationType": "derives"
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
"id": "req-no-retry--derives--need",
|
|
967
|
+
"sourceId": "req-no-retry",
|
|
968
|
+
"targetId": "need",
|
|
969
|
+
"relationType": "derives"
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
"id": "sc-pr-suite--verifies--req-pr-suite",
|
|
973
|
+
"sourceId": "sc-pr-suite",
|
|
974
|
+
"targetId": "req-pr-suite",
|
|
975
|
+
"relationType": "verifies"
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
"id": "sc-coverage--verifies--req-coverage",
|
|
979
|
+
"sourceId": "sc-coverage",
|
|
980
|
+
"targetId": "req-coverage",
|
|
981
|
+
"relationType": "verifies"
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
"id": "sc-mutation--verifies--req-mutation",
|
|
985
|
+
"sourceId": "sc-mutation",
|
|
986
|
+
"targetId": "req-mutation",
|
|
987
|
+
"relationType": "verifies"
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
"id": "sc-pyramid--verifies--req-pyramid",
|
|
991
|
+
"sourceId": "sc-pyramid",
|
|
992
|
+
"targetId": "req-pyramid",
|
|
993
|
+
"relationType": "verifies"
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
"id": "sc-trophy--verifies--req-trophy",
|
|
997
|
+
"sourceId": "sc-trophy",
|
|
998
|
+
"targetId": "req-trophy",
|
|
999
|
+
"relationType": "verifies"
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
"id": "sc-own-data--verifies--req-own-data",
|
|
1003
|
+
"sourceId": "sc-own-data",
|
|
1004
|
+
"targetId": "req-own-data",
|
|
1005
|
+
"relationType": "verifies"
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
"id": "sc-fixtures--verifies--req-fixtures",
|
|
1009
|
+
"sourceId": "sc-fixtures",
|
|
1010
|
+
"targetId": "req-fixtures",
|
|
1011
|
+
"relationType": "verifies"
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
"id": "sc-masking--verifies--req-masking",
|
|
1015
|
+
"sourceId": "sc-masking",
|
|
1016
|
+
"targetId": "req-masking",
|
|
1017
|
+
"relationType": "verifies"
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
"id": "sc-e2e-pr--verifies--req-e2e-pr",
|
|
1021
|
+
"sourceId": "sc-e2e-pr",
|
|
1022
|
+
"targetId": "req-e2e-pr",
|
|
1023
|
+
"relationType": "verifies"
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
"id": "sc-e2e-staging--verifies--req-e2e-staging",
|
|
1027
|
+
"sourceId": "sc-e2e-staging",
|
|
1028
|
+
"targetId": "req-e2e-staging",
|
|
1029
|
+
"relationType": "verifies"
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
"id": "sc-e2e-prod--verifies--req-e2e-prod",
|
|
1033
|
+
"sourceId": "sc-e2e-prod",
|
|
1034
|
+
"targetId": "req-e2e-prod",
|
|
1035
|
+
"relationType": "verifies"
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
"id": "sc-quarantine--verifies--req-quarantine",
|
|
1039
|
+
"sourceId": "sc-quarantine",
|
|
1040
|
+
"targetId": "req-quarantine",
|
|
1041
|
+
"relationType": "verifies"
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
"id": "sc-no-retry--verifies--req-no-retry",
|
|
1045
|
+
"sourceId": "sc-no-retry",
|
|
1046
|
+
"targetId": "req-no-retry",
|
|
1047
|
+
"relationType": "verifies"
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"id": "ff-pr-time--implements--adr-pyramid",
|
|
1051
|
+
"sourceId": "ff-pr-time",
|
|
1052
|
+
"targetId": "adr-pyramid",
|
|
1053
|
+
"relationType": "implements"
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
"id": "ff-pr-time--implements--adr-trophy",
|
|
1057
|
+
"sourceId": "ff-pr-time",
|
|
1058
|
+
"targetId": "adr-trophy",
|
|
1059
|
+
"relationType": "implements"
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
"id": "ff-coverage--implements--adr-pyramid",
|
|
1063
|
+
"sourceId": "ff-coverage",
|
|
1064
|
+
"targetId": "adr-pyramid",
|
|
1065
|
+
"relationType": "implements"
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
"id": "ff-coverage--implements--adr-trophy",
|
|
1069
|
+
"sourceId": "ff-coverage",
|
|
1070
|
+
"targetId": "adr-trophy",
|
|
1071
|
+
"relationType": "implements"
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
"id": "ff-mutation--implements--adr-pyramid",
|
|
1075
|
+
"sourceId": "ff-mutation",
|
|
1076
|
+
"targetId": "adr-pyramid",
|
|
1077
|
+
"relationType": "implements"
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
"id": "ff-mutation--implements--adr-trophy",
|
|
1081
|
+
"sourceId": "ff-mutation",
|
|
1082
|
+
"targetId": "adr-trophy",
|
|
1083
|
+
"relationType": "implements"
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
"id": "ff-unit-isolated--implements--adr-pyramid",
|
|
1087
|
+
"sourceId": "ff-unit-isolated",
|
|
1088
|
+
"targetId": "adr-pyramid",
|
|
1089
|
+
"relationType": "implements"
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
"id": "ff-no-fakes--implements--adr-trophy",
|
|
1093
|
+
"sourceId": "ff-no-fakes",
|
|
1094
|
+
"targetId": "adr-trophy",
|
|
1095
|
+
"relationType": "implements"
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
"id": "ff-integration-share--implements--adr-trophy",
|
|
1099
|
+
"sourceId": "ff-integration-share",
|
|
1100
|
+
"targetId": "adr-trophy",
|
|
1101
|
+
"relationType": "implements"
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
"id": "ff-shuffle--implements--adr-pyramid",
|
|
1105
|
+
"sourceId": "ff-shuffle",
|
|
1106
|
+
"targetId": "adr-pyramid",
|
|
1107
|
+
"relationType": "implements"
|
|
1108
|
+
},
|
|
1109
|
+
{
|
|
1110
|
+
"id": "ff-shuffle--implements--adr-trophy",
|
|
1111
|
+
"sourceId": "ff-shuffle",
|
|
1112
|
+
"targetId": "adr-trophy",
|
|
1113
|
+
"relationType": "implements"
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
"id": "ff-seed-loads--implements--adr-pyramid",
|
|
1117
|
+
"sourceId": "ff-seed-loads",
|
|
1118
|
+
"targetId": "adr-pyramid",
|
|
1119
|
+
"relationType": "implements"
|
|
1120
|
+
},
|
|
1121
|
+
{
|
|
1122
|
+
"id": "ff-seed-loads--implements--adr-trophy",
|
|
1123
|
+
"sourceId": "ff-seed-loads",
|
|
1124
|
+
"targetId": "adr-trophy",
|
|
1125
|
+
"relationType": "implements"
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
"id": "ff-pii-scan--implements--adr-pyramid",
|
|
1129
|
+
"sourceId": "ff-pii-scan",
|
|
1130
|
+
"targetId": "adr-pyramid",
|
|
1131
|
+
"relationType": "implements"
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
"id": "ff-pii-scan--implements--adr-trophy",
|
|
1135
|
+
"sourceId": "ff-pii-scan",
|
|
1136
|
+
"targetId": "adr-trophy",
|
|
1137
|
+
"relationType": "implements"
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
"id": "ff-journeys-covered--implements--adr-pyramid",
|
|
1141
|
+
"sourceId": "ff-journeys-covered",
|
|
1142
|
+
"targetId": "adr-pyramid",
|
|
1143
|
+
"relationType": "implements"
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
"id": "ff-journeys-covered--implements--adr-trophy",
|
|
1147
|
+
"sourceId": "ff-journeys-covered",
|
|
1148
|
+
"targetId": "adr-trophy",
|
|
1149
|
+
"relationType": "implements"
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
"id": "ff-e2e-gate--implements--adr-pyramid",
|
|
1153
|
+
"sourceId": "ff-e2e-gate",
|
|
1154
|
+
"targetId": "adr-pyramid",
|
|
1155
|
+
"relationType": "implements"
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
"id": "ff-e2e-gate--implements--adr-trophy",
|
|
1159
|
+
"sourceId": "ff-e2e-gate",
|
|
1160
|
+
"targetId": "adr-trophy",
|
|
1161
|
+
"relationType": "implements"
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
"id": "ff-synthetic--implements--adr-pyramid",
|
|
1165
|
+
"sourceId": "ff-synthetic",
|
|
1166
|
+
"targetId": "adr-pyramid",
|
|
1167
|
+
"relationType": "implements"
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
"id": "ff-synthetic--implements--adr-trophy",
|
|
1171
|
+
"sourceId": "ff-synthetic",
|
|
1172
|
+
"targetId": "adr-trophy",
|
|
1173
|
+
"relationType": "implements"
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1176
|
+
"id": "ff-flaky-report--implements--adr-pyramid",
|
|
1177
|
+
"sourceId": "ff-flaky-report",
|
|
1178
|
+
"targetId": "adr-pyramid",
|
|
1179
|
+
"relationType": "implements"
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
"id": "ff-flaky-report--implements--adr-trophy",
|
|
1183
|
+
"sourceId": "ff-flaky-report",
|
|
1184
|
+
"targetId": "adr-trophy",
|
|
1185
|
+
"relationType": "implements"
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
"id": "ff-quarantine--implements--adr-pyramid",
|
|
1189
|
+
"sourceId": "ff-quarantine",
|
|
1190
|
+
"targetId": "adr-pyramid",
|
|
1191
|
+
"relationType": "implements"
|
|
1192
|
+
},
|
|
1193
|
+
{
|
|
1194
|
+
"id": "ff-quarantine--implements--adr-trophy",
|
|
1195
|
+
"sourceId": "ff-quarantine",
|
|
1196
|
+
"targetId": "adr-trophy",
|
|
1197
|
+
"relationType": "implements"
|
|
1198
|
+
},
|
|
1199
|
+
{
|
|
1200
|
+
"id": "ff-flaky-fails--implements--adr-pyramid",
|
|
1201
|
+
"sourceId": "ff-flaky-fails",
|
|
1202
|
+
"targetId": "adr-pyramid",
|
|
1203
|
+
"relationType": "implements"
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
"id": "ff-flaky-fails--implements--adr-trophy",
|
|
1207
|
+
"sourceId": "ff-flaky-fails",
|
|
1208
|
+
"targetId": "adr-trophy",
|
|
1209
|
+
"relationType": "implements"
|
|
1210
|
+
}
|
|
1211
|
+
]
|
|
1212
|
+
}
|