@msalaam/xray-qe-toolkit 1.3.1 → 1.3.3
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 +3 -1
- package/commands/init.js +12 -11
- package/lib/playwrightConverter.js +22 -7
- package/package.json +1 -1
- package/templates/README.template.md +4 -1
- package/templates/tests.json +74 -602
package/README.md
CHANGED
|
@@ -253,8 +253,10 @@ Scaffold a new project with starter templates.
|
|
|
253
253
|
npx xqt init
|
|
254
254
|
```
|
|
255
255
|
|
|
256
|
-
**
|
|
256
|
+
**Creates:**
|
|
257
|
+
- `knowledge/` folder with subdirectories (`api-specs/`, `requirements/`, `tickets/`)
|
|
257
258
|
- `knowledge/README.md` — guide for organizing documentation
|
|
259
|
+
- `XQT-GUIDE.md` — getting started guide for this toolkit (never named `README.md` to avoid overwriting yours)
|
|
258
260
|
- `tests.json` — starter test definitions (marked as scaffolds)
|
|
259
261
|
- `xray-mapping.json` — empty mapping file
|
|
260
262
|
- `.env.example` — environment variable template
|
package/commands/init.js
CHANGED
|
@@ -59,15 +59,15 @@ export default async function init(opts = {}) {
|
|
|
59
59
|
skipped++;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
// Copy
|
|
62
|
+
// Copy XQT guide — always written as XQT-GUIDE.md so the user's own README is never touched
|
|
63
63
|
const readmeSrc = path.join(TEMPLATES, "README.template.md");
|
|
64
|
-
const
|
|
65
|
-
if (!fs.existsSync(
|
|
66
|
-
fs.copyFileSync(readmeSrc,
|
|
67
|
-
logger.success("
|
|
64
|
+
const guideDest = path.join(cwd, "XQT-GUIDE.md");
|
|
65
|
+
if (!fs.existsSync(guideDest)) {
|
|
66
|
+
fs.copyFileSync(readmeSrc, guideDest);
|
|
67
|
+
logger.success("XQT-GUIDE.md created (Getting started guide)");
|
|
68
68
|
created++;
|
|
69
69
|
} else {
|
|
70
|
-
logger.warn("
|
|
70
|
+
logger.warn("XQT-GUIDE.md already exists — skipping");
|
|
71
71
|
skipped++;
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -132,10 +132,11 @@ export default async function init(opts = {}) {
|
|
|
132
132
|
console.log("📖 Next steps:");
|
|
133
133
|
console.log(" 1. Copy .env.example → .env and fill in your credentials");
|
|
134
134
|
console.log(" 2. Add API specs and docs to knowledge/ folder (see knowledge/README.md)");
|
|
135
|
-
console.log(" 3.
|
|
136
|
-
console.log(" 4.
|
|
137
|
-
console.log(" 5.
|
|
138
|
-
console.log(" 6.
|
|
139
|
-
console.log(" 7. Generate
|
|
135
|
+
console.log(" 3. See XQT-GUIDE.md for the full workflow and command reference");
|
|
136
|
+
console.log(" 4. Generate test cases: npx xray-qe gen-tests --ai (or edit tests.json manually)");
|
|
137
|
+
console.log(" 5. Review tests: npx xray-qe edit-json");
|
|
138
|
+
console.log(" 6. Push tests to Xray: npx xray-qe push-tests");
|
|
139
|
+
console.log(" 7. Generate Postman collection: npx xray-qe gen-postman --ai");
|
|
140
|
+
console.log(" 8. Generate CI pipeline: npx xray-qe gen-pipeline");
|
|
140
141
|
console.log("");
|
|
141
142
|
}
|
|
@@ -23,9 +23,12 @@
|
|
|
23
23
|
* @returns {object} Xray JSON format
|
|
24
24
|
*/
|
|
25
25
|
export function convertPlaywrightToXray(playwrightJson, options = {}) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
26
|
+
// Use current time as fallback for timestamps
|
|
27
|
+
const now = Date.now();
|
|
28
|
+
const totalDuration = getTotalDuration(playwrightJson);
|
|
29
|
+
|
|
30
|
+
const startTime = new Date(now - totalDuration).toISOString();
|
|
31
|
+
const finishTime = new Date(now).toISOString();
|
|
29
32
|
|
|
30
33
|
const xrayJson = {
|
|
31
34
|
info: {
|
|
@@ -185,10 +188,22 @@ function convertTest(test, spec, suite, options) {
|
|
|
185
188
|
|
|
186
189
|
// Add start/finish times if available
|
|
187
190
|
if (result.startTime) {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
191
|
+
try {
|
|
192
|
+
const startDate = new Date(result.startTime);
|
|
193
|
+
if (!isNaN(startDate.getTime())) {
|
|
194
|
+
xrayTest.start = startDate.toISOString();
|
|
195
|
+
|
|
196
|
+
// Calculate finish time if we have duration
|
|
197
|
+
if (result.duration) {
|
|
198
|
+
const finishDate = new Date(startDate.getTime() + result.duration);
|
|
199
|
+
if (!isNaN(finishDate.getTime())) {
|
|
200
|
+
xrayTest.finish = finishDate.toISOString();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
} catch (error) {
|
|
205
|
+
// Skip invalid timestamps silently
|
|
206
|
+
}
|
|
192
207
|
}
|
|
193
208
|
|
|
194
209
|
// Add error details if test failed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@msalaam/xray-qe-toolkit",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "Full QE workflow toolkit for Xray Cloud integration — test management, Postman generation, CI pipeline scaffolding, and browser-based review gates for API regression projects.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
# Xray QE Toolkit
|
|
1
|
+
# XQT-GUIDE — Xray QE Toolkit
|
|
2
2
|
|
|
3
3
|
> Quality Engineering workflow automation for Xray Cloud integration
|
|
4
|
+
>
|
|
5
|
+
> This file was created by `npx xqt init`. It is intentionally named `XQT-GUIDE.md`
|
|
6
|
+
> so it never overwrites your project's own `README.md`.
|
|
4
7
|
|
|
5
8
|
## Quick Start
|
|
6
9
|
|
package/templates/tests.json
CHANGED
|
@@ -1,603 +1,75 @@
|
|
|
1
|
-
{
|
|
2
|
-
"testExecution": {
|
|
3
|
-
"summary": "
|
|
4
|
-
"description": "Automated regression
|
|
5
|
-
},
|
|
6
|
-
"tests": [
|
|
7
|
-
{
|
|
8
|
-
"test_id": "
|
|
9
|
-
"type": "api",
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
{
|
|
76
|
-
"action": "Validate failure response contains message property",
|
|
77
|
-
"data": "Check response format: { message: 'An error occurred...' }",
|
|
78
|
-
"expected_result": "Response has 'message' property with descriptive error string (length > 0). Failures do NOT return overallResult, directors, or propertyComparisons"
|
|
79
|
-
}
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"test_id": "APIEE-5955",
|
|
85
|
-
"type": "api",
|
|
86
|
-
"tags": [
|
|
87
|
-
"regression",
|
|
88
|
-
"verify",
|
|
89
|
-
"entity",
|
|
90
|
-
"directors",
|
|
91
|
-
"negative"
|
|
92
|
-
],
|
|
93
|
-
"xray": {
|
|
94
|
-
"summary": "Verify Failure with Director Mismatch",
|
|
95
|
-
"description": "Test that entity verification fails when provided directors do not match the entity's registered directors. Complete failures return only overallResult=fail without directors/propertyComparisons.",
|
|
96
|
-
"priority": "High",
|
|
97
|
-
"labels": [
|
|
98
|
-
"API",
|
|
99
|
-
"VerifyEntity",
|
|
100
|
-
"Directors",
|
|
101
|
-
"Validation"
|
|
102
|
-
],
|
|
103
|
-
"steps": [
|
|
104
|
-
{
|
|
105
|
-
"action": "Send POST request to /aml/verify/entity with mismatched directors",
|
|
106
|
-
"data": "Request: RegistrationNumber=1999/004643/06, RegistrationName='Old Mutual Life Assurance Company (South Africa)', Directors with fake IDs that don't match. Source=LABEEQ, User=OM66803. Header: X-IBM-Client-Id",
|
|
107
|
-
"expected_result": "API returns HTTP 200 status"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"action": "Attach full response as test evidence",
|
|
111
|
-
"data": "Attach status, headers, and response body",
|
|
112
|
-
"expected_result": "Response evidence captured for Xray reporting"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"action": "Validate failure response contains message property",
|
|
116
|
-
"data": "Check response format: { message: 'An error occurred...' }",
|
|
117
|
-
"expected_result": "Response has 'message' property with descriptive error string (length > 0). Failures do NOT return overallResult, directors, or propertyComparisons"
|
|
118
|
-
}
|
|
119
|
-
]
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"test_id": "APIEE-5960",
|
|
124
|
-
"type": "api",
|
|
125
|
-
"tags": [
|
|
126
|
-
"regression",
|
|
127
|
-
"verify",
|
|
128
|
-
"entity",
|
|
129
|
-
"positive",
|
|
130
|
-
"directors"
|
|
131
|
-
],
|
|
132
|
-
"xray": {
|
|
133
|
-
"summary": "Verify Full Match Validation",
|
|
134
|
-
"description": "Test entity verification with 20 directors for Nedbank (1951/000009/06) where all directors match successfully. STRICT validation: must return exactly 'pass' (not 'pass with warning' or 'partial') with numberOfDirectorsMissing=0.",
|
|
135
|
-
"priority": "High",
|
|
136
|
-
"labels": [
|
|
137
|
-
"API",
|
|
138
|
-
"VerifyEntity",
|
|
139
|
-
"Validation",
|
|
140
|
-
"MultiDirector",
|
|
141
|
-
"FullMatch",
|
|
142
|
-
"Positive"
|
|
143
|
-
],
|
|
144
|
-
"steps": [
|
|
145
|
-
{
|
|
146
|
-
"action": "Send POST request to /aml/verify/entity with Nedbank entity and 20 matching directors",
|
|
147
|
-
"data": "Request: RegistrationNumber=1951/000009/06, RegistrationName='Nedbank', 20 directors with all names matching data source. Source=LABEEQ, User=OM66803. Header: X-IBM-Client-Id",
|
|
148
|
-
"expected_result": "API returns HTTP 200 status OR 201 with async id"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"action": "Attach full response as test evidence",
|
|
152
|
-
"data": "Attach status, headers, and response body",
|
|
153
|
-
"expected_result": "Response evidence captured for Xray reporting"
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"action": "STRICT validation: overallResult must be exactly 'pass'",
|
|
157
|
-
"data": "Check overallResult field (case-insensitive)",
|
|
158
|
-
"expected_result": "overallResult='pass' ONLY (NOT 'pass with warning', 'partial', or 'fail')"
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
"action": "Validate numberOfDirectorsMissing is 0",
|
|
162
|
-
"data": "Check numberOfDirectorsMissing field",
|
|
163
|
-
"expected_result": "numberOfDirectorsMissing=0 (all 20 directors matched)"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"action": "Validate directors array exists and is populated",
|
|
167
|
-
"data": "Check directors array is present with director objects",
|
|
168
|
-
"expected_result": "Directors array contains all matched directors with identityNumber, livingStatus, propertyComparisons fields"
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"action": "Handle async response if returned",
|
|
172
|
-
"data": "If async response (201 with id): wait 2s, GET /aml/verify/entity/{messageId}, validate same strict rules",
|
|
173
|
-
"expected_result": "Async response also has overallResult='pass' and numberOfDirectorsMissing=0"
|
|
174
|
-
}
|
|
175
|
-
]
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
"test_id": "APIEE-5961",
|
|
180
|
-
"type": "api",
|
|
181
|
-
"tags": [
|
|
182
|
-
"regression",
|
|
183
|
-
"verify",
|
|
184
|
-
"entity",
|
|
185
|
-
"directors",
|
|
186
|
-
"partial"
|
|
187
|
-
],
|
|
188
|
-
"xray": {
|
|
189
|
-
"summary": "Verify Partial Match with One Missing Director",
|
|
190
|
-
"description": "Test entity verification with 19 directors (same payload as APIEE-5960 minus 1 director). STRICT validation: must return 'pass with warning' or 'partial' (NOT 'pass' or 'fail') with numberOfDirectorsMissing > 0.",
|
|
191
|
-
"priority": "Medium",
|
|
192
|
-
"labels": [
|
|
193
|
-
"API",
|
|
194
|
-
"VerifyEntity",
|
|
195
|
-
"Directors",
|
|
196
|
-
"PartialMatch"
|
|
197
|
-
],
|
|
198
|
-
"steps": [
|
|
199
|
-
{
|
|
200
|
-
"action": "Send POST request to /aml/verify/entity with 19 directors (one less than full match)",
|
|
201
|
-
"data": "Request: RegistrationNumber=1951/000009/06, RegistrationName='Nedbank', 19 directors (removed LINDA MAKALIMA from full 20 list). Source=LABEEQ, User=OM66803. Header: X-IBM-Client-Id",
|
|
202
|
-
"expected_result": "API returns HTTP 200 status"
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
"action": "Attach full response as test evidence",
|
|
206
|
-
"data": "Attach status, headers, and response body",
|
|
207
|
-
"expected_result": "Response evidence captured for Xray reporting"
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
"action": "STRICT validation: overallResult must be 'pass with warning' or 'partial'",
|
|
211
|
-
"data": "Check overallResult field (case-insensitive)",
|
|
212
|
-
"expected_result": "overallResult='pass with warning' OR 'partial' ONLY (NOT 'pass' or 'fail')"
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
"action": "Validate numberOfDirectorsMissing is greater than 0",
|
|
216
|
-
"data": "Check numberOfDirectorsMissing field",
|
|
217
|
-
"expected_result": "numberOfDirectorsMissing > 0 (at least 1 director missing: LINDA MAKALIMA)"
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
"action": "Validate directors array exists and is populated",
|
|
221
|
-
"data": "Check directors array contains matched directors",
|
|
222
|
-
"expected_result": "Directors array is present with at least one director object"
|
|
223
|
-
}
|
|
224
|
-
]
|
|
225
|
-
}
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
"test_id": "APIEE-5962",
|
|
229
|
-
"type": "api",
|
|
230
|
-
"tags": [
|
|
231
|
-
"regression",
|
|
232
|
-
"verify",
|
|
233
|
-
"entity",
|
|
234
|
-
"negative"
|
|
235
|
-
],
|
|
236
|
-
"xray": {
|
|
237
|
-
"summary": "Verify Failure on Entity Name Mismatch",
|
|
238
|
-
"description": "Test that entity verification returns validation failure when the entity registration name doesn't match. Returns structured response with overallResult=Fail and propertyComparisons showing RegistrationName failed.",
|
|
239
|
-
"priority": "High",
|
|
240
|
-
"labels": [
|
|
241
|
-
"API",
|
|
242
|
-
"VerifyEntity",
|
|
243
|
-
"Validation",
|
|
244
|
-
"Negative"
|
|
245
|
-
],
|
|
246
|
-
"steps": [
|
|
247
|
-
{
|
|
248
|
-
"action": "Send POST request to /aml/verify/entity with mismatched entity name",
|
|
249
|
-
"data": "Request: RegistrationNumber=1951/000009/06, RegistrationName='Wrong Bank Name Limited', 1 director. Source=LABEEQ, User=OM66803. Header: X-IBM-Client-Id",
|
|
250
|
-
"expected_result": "API returns HTTP 200 status"
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
"action": "Attach full response as test evidence",
|
|
254
|
-
"data": "Attach status, headers, and response body",
|
|
255
|
-
"expected_result": "Response evidence captured for Xray reporting"
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
"action": "STRICT validation: overallResult must be 'fail'",
|
|
259
|
-
"data": "Check overallResult field (case-insensitive)",
|
|
260
|
-
"expected_result": "overallResult='fail' for name mismatch validation failure"
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
"action": "Validate propertyComparisons shows RegistrationName failed",
|
|
264
|
-
"data": "Check propertyComparisons array for RegistrationName entry with result='Fail'",
|
|
265
|
-
"expected_result": "RegistrationName property comparison has result='Fail' with sourceValue=null"
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
"action": "Validate directors array exists",
|
|
269
|
-
"data": "Check directors field is present (may contain matched directors)",
|
|
270
|
-
"expected_result": "Directors array is present and may have directors from request"
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
"action": "Validate numberOfDirectorsMissing > 0",
|
|
274
|
-
"data": "Check numberOfDirectorsMissing field",
|
|
275
|
-
"expected_result": "numberOfDirectorsMissing > 0 indicating missing directors from data source"
|
|
276
|
-
}
|
|
277
|
-
]
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
"test_id": "APIEE-5965",
|
|
282
|
-
"type": "api",
|
|
283
|
-
"tags": [
|
|
284
|
-
"regression",
|
|
285
|
-
"verify",
|
|
286
|
-
"entity",
|
|
287
|
-
"directors",
|
|
288
|
-
"negative"
|
|
289
|
-
],
|
|
290
|
-
"xray": {
|
|
291
|
-
"summary": "Verify Fail When No Valid Directors Match",
|
|
292
|
-
"description": "Test that entity verification returns 'Fail' when request has correct registration details but all provided directors are fake/invalid and don't match any directors in the data source. API should return numberOfDirectorsMissing=20 (all real Nedbank directors missing).",
|
|
293
|
-
"priority": "High",
|
|
294
|
-
"labels": [
|
|
295
|
-
"API",
|
|
296
|
-
"VerifyEntity",
|
|
297
|
-
"Directors",
|
|
298
|
-
"Negative",
|
|
299
|
-
"Validation"
|
|
300
|
-
],
|
|
301
|
-
"steps": [
|
|
302
|
-
{
|
|
303
|
-
"action": "Send POST request to /aml/verify/entity with fake/invalid Directors",
|
|
304
|
-
"data": "Request: RegistrationNumber=1951/000009/06, RegistrationName='Nedbank', Directors=[2 fake directors with invalid IDs 9999999999999 and 8888888888888]. Source=LABEEQ, User=OM66803. Header: X-IBM-Client-Id",
|
|
305
|
-
"expected_result": "API returns HTTP 200 status"
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
"action": "Attach full response as test evidence",
|
|
309
|
-
"data": "Attach status, headers, and response body",
|
|
310
|
-
"expected_result": "Response evidence captured for Xray reporting"
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
"action": "Validate overallResult is 'Fail'",
|
|
314
|
-
"data": "Check overallResult field (case-insensitive)",
|
|
315
|
-
"expected_result": "overallResult='Fail' (NOT 'pass', 'pass with warning', or 'partial'). None of the provided directors match data source."
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
"action": "Validate directors array exists",
|
|
319
|
-
"data": "Check directors field is an array",
|
|
320
|
-
"expected_result": "directors array present (may contain the fake directors we sent)"
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
"action": "Validate numberOfDirectorsMissing is 20",
|
|
324
|
-
"data": "Check numberOfDirectorsMissing field",
|
|
325
|
-
"expected_result": "numberOfDirectorsMissing=20 (all 20 real Nedbank directors are missing since none of our fake directors matched)"
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
"action": "Validate propertyComparisons exists",
|
|
329
|
-
"data": "Check propertyComparisons array",
|
|
330
|
-
"expected_result": "propertyComparisons array present (registration should pass but directors fail)"
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
"action": "Validate response includes registration fields",
|
|
334
|
-
"data": "Check registrationNumber and registrationName fields",
|
|
335
|
-
"expected_result": "Response has registrationNumber and registrationName fields populated"
|
|
336
|
-
}
|
|
337
|
-
]
|
|
338
|
-
}
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
"test_id": "APIEE-6267",
|
|
342
|
-
"type": "api",
|
|
343
|
-
"tags": [
|
|
344
|
-
"regression",
|
|
345
|
-
"verify",
|
|
346
|
-
"entity",
|
|
347
|
-
"directors",
|
|
348
|
-
"response"
|
|
349
|
-
],
|
|
350
|
-
"xray": {
|
|
351
|
-
"summary": "Verify Entity Name Details For All Directors",
|
|
352
|
-
"description": "Test that entity verification response includes the registration name and that all 20 Nedbank directors have complete details including identity numbers and property comparisons.",
|
|
353
|
-
"priority": "Medium",
|
|
354
|
-
"labels": [
|
|
355
|
-
"API",
|
|
356
|
-
"VerifyEntity",
|
|
357
|
-
"Directors",
|
|
358
|
-
"ResponseValidation"
|
|
359
|
-
],
|
|
360
|
-
"steps": [
|
|
361
|
-
{
|
|
362
|
-
"action": "Send POST request to /aml/verify/entity with valid entity and all 20 directors",
|
|
363
|
-
"data": "Request: RegistrationNumber=1951/000009/06, RegistrationName='Nedbank', all 20 directors. Source=CUPID, User=OM66803. Header: X-IBM-Client-Id",
|
|
364
|
-
"expected_result": "API returns HTTP 200 status OR 201 with async id"
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
"action": "Attach full response as test evidence",
|
|
368
|
-
"data": "Attach status, headers, and response body",
|
|
369
|
-
"expected_result": "Response evidence captured for Xray reporting"
|
|
370
|
-
},
|
|
371
|
-
{
|
|
372
|
-
"action": "STRICT validation: overallResult must be 'pass'",
|
|
373
|
-
"data": "Check overallResult field (case-insensitive)",
|
|
374
|
-
"expected_result": "overallResult='pass' for positive test validation"
|
|
375
|
-
},
|
|
376
|
-
{
|
|
377
|
-
"action": "Validate registrationName is present and non-empty",
|
|
378
|
-
"data": "Check registrationName field is string type with length > 0",
|
|
379
|
-
"expected_result": "registrationName field exists and contains entity name string"
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
"action": "Validate all directors have required fields",
|
|
383
|
-
"data": "Iterate through directors array checking each has identityNumber and propertyComparisons",
|
|
384
|
-
"expected_result": "Each director object has identityNumber field and propertyComparisons array"
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
"action": "Handle async response if returned",
|
|
388
|
-
"data": "If async response (201 with id): wait 2s, GET /aml/verify/entity/{messageId}, validate same requirements",
|
|
389
|
-
"expected_result": "Async response also contains registrationName and directors with complete details"
|
|
390
|
-
}
|
|
391
|
-
]
|
|
392
|
-
}
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
"test_id": "APIEE-6270",
|
|
396
|
-
"type": "api",
|
|
397
|
-
"tags": [
|
|
398
|
-
"regression",
|
|
399
|
-
"verify",
|
|
400
|
-
"entity",
|
|
401
|
-
"directors",
|
|
402
|
-
"livingStatus"
|
|
403
|
-
],
|
|
404
|
-
"xray": {
|
|
405
|
-
"summary": "Verify Entity Response Contains LivingStatus",
|
|
406
|
-
"description": "Test that entity verification response includes living status information for each director using all 20 Nedbank directors. This validates that the API provides complete director information including their living status.",
|
|
407
|
-
"priority": "Medium",
|
|
408
|
-
"labels": [
|
|
409
|
-
"API",
|
|
410
|
-
"VerifyEntity",
|
|
411
|
-
"Directors",
|
|
412
|
-
"LivingStatus"
|
|
413
|
-
],
|
|
414
|
-
"steps": [
|
|
415
|
-
{
|
|
416
|
-
"action": "Send POST request to /aml/verify/entity with valid entity and all 20 directors",
|
|
417
|
-
"data": "Request: RegistrationNumber=1951/000009/06, RegistrationName='Nedbank', all 20 directors with identity numbers. Source=LABEEQ, User=OM66803. Header: X-IBM-Client-Id",
|
|
418
|
-
"expected_result": "API returns HTTP 200 status OR 201 with async id"
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
"action": "Attach full response as test evidence",
|
|
422
|
-
"data": "Attach status, headers, and response body",
|
|
423
|
-
"expected_result": "Response evidence captured for Xray reporting"
|
|
424
|
-
},
|
|
425
|
-
{
|
|
426
|
-
"action": "STRICT validation: overallResult must be 'pass'",
|
|
427
|
-
"data": "Check overallResult field (case-insensitive)",
|
|
428
|
-
"expected_result": "overallResult='pass' for positive test validation"
|
|
429
|
-
},
|
|
430
|
-
{
|
|
431
|
-
"action": "Validate directors array exists and is populated",
|
|
432
|
-
"data": "Check directors array is present with at least one director",
|
|
433
|
-
"expected_result": "Directors array length is greater than 0"
|
|
434
|
-
},
|
|
435
|
-
{
|
|
436
|
-
"action": "Validate each director has livingStatus field",
|
|
437
|
-
"data": "Iterate through directors array checking livingStatus and propertyComparisons fields",
|
|
438
|
-
"expected_result": "Each director object has livingStatus field (can be 'Alive' or null) and propertyComparisons array"
|
|
439
|
-
},
|
|
440
|
-
{
|
|
441
|
-
"action": "Handle async response if returned",
|
|
442
|
-
"data": "If async response (201 with id): wait 2s, GET /aml/verify/entity/{messageId}, validate same living status requirements",
|
|
443
|
-
"expected_result": "Async response also contains directors with livingStatus fields"
|
|
444
|
-
},
|
|
445
|
-
{
|
|
446
|
-
"action": "Handle null values for non South African directors",
|
|
447
|
-
"data": "livingStatus for DIrectors who are not South African will have null values. This is not a fail.",
|
|
448
|
-
"expected_result": "overallResult = PASS, all directors present in response."
|
|
449
|
-
}
|
|
450
|
-
]
|
|
451
|
-
}
|
|
452
|
-
},
|
|
453
|
-
{
|
|
454
|
-
"test_id": "APIEE-5975",
|
|
455
|
-
"type": "api",
|
|
456
|
-
"tags": [
|
|
457
|
-
"regression",
|
|
458
|
-
"verify",
|
|
459
|
-
"entity",
|
|
460
|
-
"positive"
|
|
461
|
-
],
|
|
462
|
-
"xray": {
|
|
463
|
-
"summary": "Verify Data Source Used for ID Verification",
|
|
464
|
-
"description": "Test that entity verification correctly uses the data source to verify entity information with all 20 Nedbank directors. The response should include property comparisons with Levenshtein distance values showing how closely registration details match.",
|
|
465
|
-
"priority": "High",
|
|
466
|
-
"labels": [
|
|
467
|
-
"API",
|
|
468
|
-
"VerifyEntity",
|
|
469
|
-
"Validation",
|
|
470
|
-
"DataSource"
|
|
471
|
-
],
|
|
472
|
-
"steps": [
|
|
473
|
-
{
|
|
474
|
-
"action": "Send POST request to /aml/verify/entity with valid entity details and all 20 directors",
|
|
475
|
-
"data": "Request: RegistrationNumber=1951/000009/06, RegistrationName='Nedbank', all 20 directors. Source=CUPID, User=OM66803. Header: X-IBM-Client-Id",
|
|
476
|
-
"expected_result": "API returns HTTP 200 status OR 201 with async id"
|
|
477
|
-
},
|
|
478
|
-
{
|
|
479
|
-
"action": "Attach full response as test evidence",
|
|
480
|
-
"data": "Attach status, headers, and response body",
|
|
481
|
-
"expected_result": "Response evidence captured for Xray reporting"
|
|
482
|
-
},
|
|
483
|
-
{
|
|
484
|
-
"action": "Validate property comparisons exist and have levenshteinValue",
|
|
485
|
-
"data": "Check propertyComparisons array for propertyName, levenshteinValue (number), result",
|
|
486
|
-
"expected_result": "Each property comparison has levenshteinValue field (number type), propertyName, and result"
|
|
487
|
-
},
|
|
488
|
-
{
|
|
489
|
-
"action": "STRICT validation: overallResult must be 'pass'",
|
|
490
|
-
"data": "Check overallResult field (case-insensitive)",
|
|
491
|
-
"expected_result": "overallResult='pass' for positive test validation"
|
|
492
|
-
},
|
|
493
|
-
{
|
|
494
|
-
"action": "Validate registrationNumber and registrationName present",
|
|
495
|
-
"data": "Check response contains registrationNumber and registrationName fields",
|
|
496
|
-
"expected_result": "Response includes registrationNumber and registrationName from data source"
|
|
497
|
-
}
|
|
498
|
-
]
|
|
499
|
-
}
|
|
500
|
-
},
|
|
501
|
-
{
|
|
502
|
-
"test_id": "APIEE-5959",
|
|
503
|
-
"type": "api",
|
|
504
|
-
"tags": [
|
|
505
|
-
"regression",
|
|
506
|
-
"certify",
|
|
507
|
-
"entity",
|
|
508
|
-
"post"
|
|
509
|
-
],
|
|
510
|
-
"xray": {
|
|
511
|
-
"summary": "Verify Certificate Generation for Validated Entity - POST",
|
|
512
|
-
"description": "Test that certificate generation via POST works correctly for a validated entity. The API should return a response containing id and CombinedEncodedPDF that can be used to retrieve the certificate document.",
|
|
513
|
-
"priority": "High",
|
|
514
|
-
"labels": [
|
|
515
|
-
"API",
|
|
516
|
-
"CertifyEntity",
|
|
517
|
-
"Certificate",
|
|
518
|
-
"POST"
|
|
519
|
-
],
|
|
520
|
-
"steps": [
|
|
521
|
-
{
|
|
522
|
-
"action": "Send POST request to /aml/certify/entity with validated entity data",
|
|
523
|
-
"data": "Request: RegistrationNumber, RegistrationName, Directors with full address details. Source=LABEEQ. Header: X-Gravitee-Api-Key (configured in service)",
|
|
524
|
-
"expected_result": "API returns HTTP 200 status OR 201 with async processing id"
|
|
525
|
-
},
|
|
526
|
-
{
|
|
527
|
-
"action": "Attach full response as test evidence",
|
|
528
|
-
"data": "Attach status, headers, and response body",
|
|
529
|
-
"expected_result": "Response evidence captured for Xray reporting"
|
|
530
|
-
},
|
|
531
|
-
{
|
|
532
|
-
"action": "Validate POST response structure contains Results array",
|
|
533
|
-
"data": "Check response format: {bh_response_code, http_code, Results: [{CombinedEncodedPDF, EncodedPDF, ...}]}",
|
|
534
|
-
"expected_result": "Response has http_code field, status_message field, and Results array"
|
|
535
|
-
},
|
|
536
|
-
{
|
|
537
|
-
"action": "Validate CombinedEncodedPDF exists in Results[0]",
|
|
538
|
-
"data": "Extract Results[0].CombinedEncodedPDF or Results[0].EncodedPDF",
|
|
539
|
-
"expected_result": "Results[0].CombinedEncodedPDF is a non-empty string in GUID format (e.g., 764e49c7-c693-4d89-ad56-675bcf6bcd14) that can be used for document retrieval"
|
|
540
|
-
}
|
|
541
|
-
]
|
|
542
|
-
}
|
|
543
|
-
},
|
|
544
|
-
{
|
|
545
|
-
"test_id": "APIEE-6277",
|
|
546
|
-
"type": "api",
|
|
547
|
-
"tags": [
|
|
548
|
-
"regression",
|
|
549
|
-
"certify",
|
|
550
|
-
"entity",
|
|
551
|
-
"get"
|
|
552
|
-
],
|
|
553
|
-
"xray": {
|
|
554
|
-
"summary": "Verify Certificate Generation for Validated Entity - GET",
|
|
555
|
-
"description": "Test that certificate document can be retrieved via GET endpoint using CombinedEncodedPDF from POST response. The GET /aml/certify/document/{CombinedEncodedPDF} endpoint should return the certificate with id, contentType, and content fields.",
|
|
556
|
-
"priority": "High",
|
|
557
|
-
"labels": [
|
|
558
|
-
"API",
|
|
559
|
-
"CertifyEntity",
|
|
560
|
-
"Certificate",
|
|
561
|
-
"GET"
|
|
562
|
-
],
|
|
563
|
-
"steps": [
|
|
564
|
-
{
|
|
565
|
-
"action": "Send POST request to /aml/certify/entity to generate certificate",
|
|
566
|
-
"data": "Request: RegistrationNumber=1999/004643/06, RegistrationName='Old Mutual Life Assurance Company (South Africa)', Directors with address. Source=LABEEQ. Header: X-Gravitee-Api-Key (configured in service)",
|
|
567
|
-
"expected_result": "API returns HTTP 200 status OR 201"
|
|
568
|
-
},
|
|
569
|
-
{
|
|
570
|
-
"action": "Attach POST response as test evidence",
|
|
571
|
-
"data": "Attach status, headers, and response body from POST request",
|
|
572
|
-
"expected_result": "POST response evidence captured"
|
|
573
|
-
},
|
|
574
|
-
{
|
|
575
|
-
"action": "Extract CombinedEncodedPDF from Results array",
|
|
576
|
-
"data": "Get Results[0].CombinedEncodedPDF or Results[0].EncodedPDF field from POST response body",
|
|
577
|
-
"expected_result": "CombinedEncodedPDF is a non-empty GUID string (e.g., 764e49c7-c693-4d89-ad56-675bcf6bcd14)"
|
|
578
|
-
},
|
|
579
|
-
{
|
|
580
|
-
"action": "Wait 2 seconds for certificate processing",
|
|
581
|
-
"data": "Allow backend time to process and store certificate",
|
|
582
|
-
"expected_result": "Processing delay completed"
|
|
583
|
-
},
|
|
584
|
-
{
|
|
585
|
-
"action": "Send GET request to /aml/certify/document/{CombinedEncodedPDF}",
|
|
586
|
-
"data": "Use CombinedEncodedPDF from POST response as URL parameter. Header: X-IBM-Client-Id (configured in service)",
|
|
587
|
-
"expected_result": "API returns HTTP 200 status"
|
|
588
|
-
},
|
|
589
|
-
{
|
|
590
|
-
"action": "Attach GET response as test evidence",
|
|
591
|
-
"data": "Attach status, headers, and response body from GET request",
|
|
592
|
-
"expected_result": "GET response evidence captured"
|
|
593
|
-
},
|
|
594
|
-
{
|
|
595
|
-
"action": "Validate document response structure",
|
|
596
|
-
"data": "Check response contains id, contentType, and content fields",
|
|
597
|
-
"expected_result": "Response has id (defined), contentType (defined, e.g. 'application/pdf'), and content (base64 encoded PDF string with length > 0)"
|
|
598
|
-
}
|
|
599
|
-
]
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"testExecution": {
|
|
3
|
+
"summary": "My Project - Regression Suite",
|
|
4
|
+
"description": "Automated regression tests for My Project API"
|
|
5
|
+
},
|
|
6
|
+
"tests": [
|
|
7
|
+
{
|
|
8
|
+
"test_id": "TC-API-001",
|
|
9
|
+
"type": "api",
|
|
10
|
+
"skip": false,
|
|
11
|
+
"tags": ["regression", "smoke"],
|
|
12
|
+
"xray": {
|
|
13
|
+
"summary": "Verify successful response for valid request",
|
|
14
|
+
"description": "Test that the API returns the expected data and status code for a valid, well-formed request.",
|
|
15
|
+
"priority": "High",
|
|
16
|
+
"labels": ["API", "Positive", "Regression"],
|
|
17
|
+
"steps": [
|
|
18
|
+
{
|
|
19
|
+
"action": "Send GET request to /api/resource with valid parameters",
|
|
20
|
+
"data": "Method: GET, Headers: Authorization: Bearer {token}, Params: id=1",
|
|
21
|
+
"expected_result": "API returns HTTP 200 with resource object"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"action": "Validate response body structure",
|
|
25
|
+
"data": "Response body JSON",
|
|
26
|
+
"expected_result": "Response contains expected fields: id, name, status"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"test_id": "TC-API-002",
|
|
33
|
+
"type": "api",
|
|
34
|
+
"skip": false,
|
|
35
|
+
"tags": ["regression", "negative"],
|
|
36
|
+
"xray": {
|
|
37
|
+
"summary": "Verify error response for invalid request",
|
|
38
|
+
"description": "Test that the API returns a descriptive error when invalid or missing input is provided.",
|
|
39
|
+
"priority": "Medium",
|
|
40
|
+
"labels": ["API", "Negative", "Validation"],
|
|
41
|
+
"steps": [
|
|
42
|
+
{
|
|
43
|
+
"action": "Send POST request to /api/resource with missing required fields",
|
|
44
|
+
"data": "Method: POST, Headers: Authorization: Bearer {token}, Body: {}",
|
|
45
|
+
"expected_result": "API returns HTTP 400 Bad Request"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"action": "Validate error response body",
|
|
49
|
+
"data": "Response body JSON",
|
|
50
|
+
"expected_result": "Response contains 'error' field with a descriptive message string"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"test_id": "TC-API-003",
|
|
57
|
+
"type": "api",
|
|
58
|
+
"skip": true,
|
|
59
|
+
"tags": ["edge", "performance"],
|
|
60
|
+
"xray": {
|
|
61
|
+
"summary": "Verify API handles large payload within acceptable time",
|
|
62
|
+
"description": "Test that the API processes a large request payload without timeout or degraded response.",
|
|
63
|
+
"priority": "Low",
|
|
64
|
+
"labels": ["API", "Performance", "Edge"],
|
|
65
|
+
"steps": [
|
|
66
|
+
{
|
|
67
|
+
"action": "Send POST request to /api/resource with large payload",
|
|
68
|
+
"data": "Method: POST, Headers: Authorization: Bearer {token}, Body: large JSON array with 1000 items",
|
|
69
|
+
"expected_result": "API returns HTTP 200 within 3000ms"
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
]
|
|
603
75
|
}
|