qa360 2.0.11 → 2.0.13
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/dist/commands/ai.js +26 -14
- package/dist/commands/ask.d.ts +75 -23
- package/dist/commands/ask.js +413 -265
- package/dist/commands/crawl.d.ts +24 -0
- package/dist/commands/crawl.js +121 -0
- package/dist/commands/history.js +38 -3
- package/dist/commands/init.d.ts +89 -95
- package/dist/commands/init.js +282 -200
- package/dist/commands/run.d.ts +1 -0
- package/dist/core/adapters/playwright-ui.d.ts +45 -7
- package/dist/core/adapters/playwright-ui.js +365 -59
- package/dist/core/assertions/engine.d.ts +51 -0
- package/dist/core/assertions/engine.js +530 -0
- package/dist/core/assertions/index.d.ts +11 -0
- package/dist/core/assertions/index.js +11 -0
- package/dist/core/assertions/types.d.ts +121 -0
- package/dist/core/assertions/types.js +37 -0
- package/dist/core/crawler/index.d.ts +57 -0
- package/dist/core/crawler/index.js +281 -0
- package/dist/core/crawler/journey-generator.d.ts +49 -0
- package/dist/core/crawler/journey-generator.js +412 -0
- package/dist/core/crawler/page-analyzer.d.ts +88 -0
- package/dist/core/crawler/page-analyzer.js +709 -0
- package/dist/core/crawler/selector-generator.d.ts +34 -0
- package/dist/core/crawler/selector-generator.js +240 -0
- package/dist/core/crawler/types.d.ts +353 -0
- package/dist/core/crawler/types.js +6 -0
- package/dist/core/generation/crawler-pack-generator.d.ts +44 -0
- package/dist/core/generation/crawler-pack-generator.js +231 -0
- package/dist/core/generation/index.d.ts +2 -0
- package/dist/core/generation/index.js +2 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.js +4 -0
- package/dist/core/types/pack-v1.d.ts +90 -0
- package/dist/index.js +6 -2
- package/examples/accessibility.yml +39 -16
- package/examples/api-basic.yml +19 -14
- package/examples/complete.yml +134 -42
- package/examples/fullstack.yml +66 -31
- package/examples/security.yml +47 -15
- package/examples/ui-basic.yml +16 -12
- package/package.json +3 -2
package/examples/complete.yml
CHANGED
|
@@ -1,54 +1,146 @@
|
|
|
1
1
|
# QA360 Example: Complete Test Suite
|
|
2
2
|
# All quality gates enabled - comprehensive quality assurance
|
|
3
3
|
|
|
4
|
-
version:
|
|
4
|
+
version: 2
|
|
5
5
|
name: complete-qa-suite
|
|
6
|
+
description: Comprehensive QA suite with all quality gates
|
|
6
7
|
|
|
7
8
|
gates:
|
|
8
|
-
-
|
|
9
|
-
|
|
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
|
-
|
|
9
|
+
api-health:
|
|
10
|
+
adapter: playwright-api
|
|
11
|
+
enabled: true
|
|
12
|
+
config:
|
|
13
|
+
baseUrl: "https://api.example.com"
|
|
14
|
+
smoke:
|
|
15
|
+
- "GET /health -> 200"
|
|
16
|
+
- "GET /status -> 200"
|
|
17
|
+
- "POST /login -> 200"
|
|
18
|
+
|
|
19
|
+
api-crud:
|
|
20
|
+
adapter: playwright-api
|
|
21
|
+
enabled: true
|
|
22
|
+
config:
|
|
23
|
+
baseUrl: "https://api.example.com"
|
|
24
|
+
smoke:
|
|
25
|
+
- "GET /api/v1/users -> 200"
|
|
26
|
+
- "POST /api/v1/users -> 201"
|
|
27
|
+
- "PUT /api/v1/users/1 -> 200"
|
|
28
|
+
- "DELETE /api/v1/users/1 -> 204"
|
|
29
|
+
budgets:
|
|
30
|
+
p95_ms: 1000
|
|
31
|
+
|
|
32
|
+
ui-smoke:
|
|
33
|
+
adapter: playwright-ui
|
|
34
|
+
enabled: true
|
|
35
|
+
config:
|
|
36
|
+
baseUrl: "https://example.com"
|
|
37
|
+
pages:
|
|
38
|
+
- url: "/"
|
|
39
|
+
expectedElements: ["body", "main"]
|
|
40
|
+
- url: "/dashboard"
|
|
41
|
+
expectedElements: ["body", ".dashboard"]
|
|
42
|
+
|
|
43
|
+
a11y:
|
|
44
|
+
adapter: playwright-ui
|
|
45
|
+
enabled: true
|
|
46
|
+
config:
|
|
47
|
+
baseUrl: "https://example.com"
|
|
48
|
+
pages:
|
|
49
|
+
- url: "/"
|
|
50
|
+
a11yRules:
|
|
51
|
+
- wcag2a
|
|
52
|
+
- wcag2aa
|
|
53
|
+
budgets:
|
|
54
|
+
violations: 10
|
|
55
|
+
a11y_score: 90
|
|
56
|
+
|
|
57
|
+
perf:
|
|
58
|
+
adapter: k6-perf
|
|
59
|
+
enabled: true
|
|
60
|
+
config:
|
|
61
|
+
script: |
|
|
62
|
+
import http from 'k6/http';
|
|
63
|
+
import { check } from 'k6';
|
|
64
|
+
|
|
65
|
+
export const options = {
|
|
66
|
+
stages: [
|
|
67
|
+
{ duration: '10s', target: 10 },
|
|
68
|
+
{ duration: '20s', target: 50 },
|
|
69
|
+
{ duration: '10s', target: 0 },
|
|
70
|
+
],
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export default function () {
|
|
74
|
+
const res = http.get('https://api.example.com/health');
|
|
75
|
+
check(res, {
|
|
76
|
+
'status is 200': (r) => r.status === 200,
|
|
77
|
+
'response time < 500ms': (r) => r.timings.duration < 500,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
budgets:
|
|
81
|
+
p95_ms: 2000
|
|
82
|
+
p99_ms: 5000
|
|
83
|
+
|
|
84
|
+
sast:
|
|
85
|
+
adapter: semgrep-sast
|
|
86
|
+
enabled: true
|
|
87
|
+
config:
|
|
88
|
+
rules:
|
|
89
|
+
- security
|
|
90
|
+
- owasp-top-10
|
|
91
|
+
paths:
|
|
92
|
+
- src/
|
|
93
|
+
- lib/
|
|
94
|
+
budgets:
|
|
95
|
+
high_findings: 3
|
|
96
|
+
medium_findings: 10
|
|
97
|
+
|
|
98
|
+
dast:
|
|
99
|
+
adapter: zap-dast
|
|
100
|
+
enabled: true
|
|
101
|
+
config:
|
|
102
|
+
target: api
|
|
103
|
+
profile: baseline
|
|
104
|
+
url: "https://api.example.com"
|
|
105
|
+
scanType: baseline
|
|
106
|
+
budgets:
|
|
107
|
+
high_findings: 5
|
|
108
|
+
medium_findings: 20
|
|
109
|
+
|
|
110
|
+
secrets:
|
|
111
|
+
adapter: gitleaks-secrets
|
|
112
|
+
enabled: true
|
|
113
|
+
config:
|
|
114
|
+
paths:
|
|
115
|
+
- .
|
|
116
|
+
- src/
|
|
117
|
+
- config/
|
|
118
|
+
budgets:
|
|
119
|
+
critical_findings: 0
|
|
120
|
+
|
|
121
|
+
execution:
|
|
122
|
+
default_timeout: 120000
|
|
123
|
+
default_retries: 2
|
|
124
|
+
on_failure: continue
|
|
125
|
+
parallel: true
|
|
126
|
+
max_concurrency: 3
|
|
127
|
+
|
|
128
|
+
# Optional: Docker Compose integration (uncomment if using Docker)
|
|
40
129
|
# hooks:
|
|
41
130
|
# beforeAll:
|
|
42
|
-
# -
|
|
43
|
-
#
|
|
44
|
-
#
|
|
131
|
+
# - type: docker
|
|
132
|
+
# compose:
|
|
133
|
+
# file: docker-compose.yml
|
|
134
|
+
# command: up -d
|
|
45
135
|
# timeout: 30000
|
|
136
|
+
# - type: wait_on
|
|
137
|
+
# wait_for:
|
|
138
|
+
# resource: http://localhost:3000
|
|
139
|
+
# timeout: 30000
|
|
46
140
|
#
|
|
47
141
|
# afterAll:
|
|
48
|
-
# -
|
|
142
|
+
# - type: docker
|
|
143
|
+
# compose:
|
|
144
|
+
# file: docker-compose.yml
|
|
145
|
+
# command: down
|
|
49
146
|
# timeout: 30000
|
|
50
|
-
|
|
51
|
-
# Execution settings
|
|
52
|
-
execution:
|
|
53
|
-
timeout: 120000 # 2 minutes
|
|
54
|
-
max_retries: 2
|
package/examples/fullstack.yml
CHANGED
|
@@ -1,43 +1,78 @@
|
|
|
1
1
|
# QA360 Example: Full Stack
|
|
2
2
|
# Complete testing suite with API, UI, and Performance
|
|
3
3
|
|
|
4
|
-
version:
|
|
4
|
+
version: 2
|
|
5
5
|
name: fullstack-tests
|
|
6
|
+
description: Full stack testing with API, UI and performance gates
|
|
6
7
|
|
|
7
8
|
gates:
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
9
|
+
api-health:
|
|
10
|
+
adapter: playwright-api
|
|
11
|
+
enabled: true
|
|
12
|
+
config:
|
|
13
|
+
baseUrl: "https://httpbin.org"
|
|
14
|
+
smoke:
|
|
15
|
+
- "GET /status/200 -> 200"
|
|
16
|
+
- "GET /json -> 200"
|
|
17
|
+
- "POST /post -> 200"
|
|
18
|
+
|
|
19
|
+
ui-smoke:
|
|
20
|
+
adapter: playwright-ui
|
|
21
|
+
enabled: true
|
|
22
|
+
config:
|
|
23
|
+
baseUrl: "https://example.com"
|
|
24
|
+
pages:
|
|
25
|
+
- url: "/"
|
|
26
|
+
expectedElements: ["body", "main"]
|
|
27
|
+
|
|
28
|
+
perf:
|
|
29
|
+
adapter: k6-perf
|
|
30
|
+
enabled: true
|
|
31
|
+
config:
|
|
32
|
+
script: |
|
|
33
|
+
import http from 'k6/http';
|
|
34
|
+
import { check } from 'k6';
|
|
35
|
+
|
|
36
|
+
export const options = {
|
|
37
|
+
stages: [
|
|
38
|
+
{ duration: '10s', target: 10 },
|
|
39
|
+
{ duration: '20s', target: 50 },
|
|
40
|
+
{ duration: '10s', target: 0 },
|
|
41
|
+
],
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export default function () {
|
|
45
|
+
const res = http.get('https://httpbin.org/status/200');
|
|
46
|
+
check(res, {
|
|
47
|
+
'status is 200': (r) => r.status === 200,
|
|
48
|
+
'response time < 500ms': (r) => r.timings.duration < 500,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
budgets:
|
|
52
|
+
p95_ms: 2000
|
|
53
|
+
|
|
54
|
+
execution:
|
|
55
|
+
default_timeout: 60000
|
|
56
|
+
default_retries: 2
|
|
57
|
+
on_failure: continue
|
|
58
|
+
parallel: true
|
|
59
|
+
|
|
60
|
+
# Optional: Docker Compose integration (uncomment if using Docker)
|
|
30
61
|
# hooks:
|
|
31
62
|
# beforeAll:
|
|
32
|
-
# -
|
|
33
|
-
#
|
|
34
|
-
#
|
|
63
|
+
# - type: docker
|
|
64
|
+
# compose:
|
|
65
|
+
# file: docker-compose.yml
|
|
66
|
+
# command: up -d
|
|
35
67
|
# timeout: 30000
|
|
68
|
+
# - type: wait_on
|
|
69
|
+
# wait_for:
|
|
70
|
+
# resource: http://localhost:3000
|
|
71
|
+
# timeout: 30000
|
|
36
72
|
#
|
|
37
73
|
# afterAll:
|
|
38
|
-
# -
|
|
74
|
+
# - type: docker
|
|
75
|
+
# compose:
|
|
76
|
+
# file: docker-compose.yml
|
|
77
|
+
# command: down
|
|
39
78
|
# timeout: 30000
|
|
40
|
-
|
|
41
|
-
execution:
|
|
42
|
-
timeout: 60000
|
|
43
|
-
max_retries: 2
|
package/examples/security.yml
CHANGED
|
@@ -1,26 +1,58 @@
|
|
|
1
1
|
# QA360 Example: Security Suite
|
|
2
2
|
# Comprehensive security testing (SAST, DAST)
|
|
3
3
|
|
|
4
|
-
version:
|
|
4
|
+
version: 2
|
|
5
5
|
name: security-test-suite
|
|
6
|
+
description: Security testing with SAST and DAST scans
|
|
6
7
|
|
|
7
8
|
gates:
|
|
8
|
-
-
|
|
9
|
-
|
|
9
|
+
api-health:
|
|
10
|
+
adapter: playwright-api
|
|
11
|
+
enabled: true
|
|
12
|
+
config:
|
|
13
|
+
baseUrl: "https://api.example.com"
|
|
14
|
+
smoke:
|
|
15
|
+
- "GET /health -> 200"
|
|
10
16
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
sast:
|
|
18
|
+
adapter: semgrep-sast
|
|
19
|
+
enabled: true
|
|
20
|
+
config:
|
|
21
|
+
rules:
|
|
22
|
+
- security
|
|
23
|
+
- owasp-top-10
|
|
24
|
+
paths:
|
|
25
|
+
- src/
|
|
26
|
+
- lib/
|
|
27
|
+
budgets:
|
|
28
|
+
high_findings: 3
|
|
29
|
+
medium_findings: 10
|
|
14
30
|
|
|
15
|
-
|
|
16
|
-
|
|
31
|
+
dast:
|
|
32
|
+
adapter: zap-dast
|
|
33
|
+
enabled: true
|
|
34
|
+
config:
|
|
35
|
+
target: api
|
|
36
|
+
profile: baseline
|
|
37
|
+
url: "https://api.example.com"
|
|
38
|
+
scanType: baseline
|
|
39
|
+
budgets:
|
|
40
|
+
high_findings: 5
|
|
41
|
+
medium_findings: 20
|
|
17
42
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
43
|
+
secrets:
|
|
44
|
+
adapter: gitleaks-secrets
|
|
45
|
+
enabled: true
|
|
46
|
+
config:
|
|
47
|
+
paths:
|
|
48
|
+
- .
|
|
49
|
+
- src/
|
|
50
|
+
- config/
|
|
51
|
+
budgets:
|
|
52
|
+
critical_findings: 0
|
|
22
53
|
|
|
23
|
-
# Execution settings
|
|
24
54
|
execution:
|
|
25
|
-
|
|
26
|
-
|
|
55
|
+
default_timeout: 120000
|
|
56
|
+
default_retries: 1
|
|
57
|
+
on_failure: continue
|
|
58
|
+
parallel: false
|
package/examples/ui-basic.yml
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
# QA360 Example: UI Basic
|
|
2
2
|
# Basic UI/E2E browser tests
|
|
3
3
|
|
|
4
|
-
version:
|
|
4
|
+
version: 2
|
|
5
5
|
name: ui-browser-tests
|
|
6
|
+
description: Basic UI smoke tests for web applications
|
|
6
7
|
|
|
7
8
|
gates:
|
|
8
|
-
-
|
|
9
|
+
ui-smoke:
|
|
10
|
+
adapter: playwright-ui
|
|
11
|
+
enabled: true
|
|
12
|
+
config:
|
|
13
|
+
baseUrl: "https://example.com"
|
|
14
|
+
pages:
|
|
15
|
+
- url: "/"
|
|
16
|
+
expectedElements: ["body", "main"]
|
|
17
|
+
- url: "/about"
|
|
18
|
+
expectedElements: ["body"]
|
|
9
19
|
|
|
10
|
-
targets:
|
|
11
|
-
web:
|
|
12
|
-
baseUrl: "https://example.com"
|
|
13
|
-
pages:
|
|
14
|
-
- "https://example.com"
|
|
15
|
-
- "https://example.com/about"
|
|
16
|
-
|
|
17
|
-
# Optional: Browser configuration
|
|
18
20
|
execution:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
default_timeout: 60000
|
|
22
|
+
default_retries: 1
|
|
23
|
+
on_failure: continue
|
|
24
|
+
parallel: false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qa360",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.13",
|
|
4
4
|
"description": "QA360 Proof CLI - Quality as Cryptographic Proof",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"ollama": "^0.5.1",
|
|
46
46
|
"ora": "^5.4.1",
|
|
47
47
|
"playwright": "^1.57.0",
|
|
48
|
+
|
|
48
49
|
"sqlite3": "^5.1.6",
|
|
49
50
|
"tweetnacl": "^1.0.3"
|
|
50
51
|
},
|
|
@@ -72,4 +73,4 @@
|
|
|
72
73
|
"bugs": {
|
|
73
74
|
"url": "https://github.com/xyqotech/qa360/issues"
|
|
74
75
|
}
|
|
75
|
-
}
|
|
76
|
+
}
|