-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.testql.yml
More file actions
117 lines (95 loc) · 3.04 KB
/
Copy pathTaskfile.testql.yml
File metadata and controls
117 lines (95 loc) · 3.04 KB
1
2
3
4
5
6
7
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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# TestQL Self-Testing
# https://taskfile.dev
version: '3'
vars:
TESTQL_DIR: testql-scenarios
tasks:
default:
cmds:
- task --list
analyze:
desc: Analyze project structure for testability
cmds:
- testql analyze .
generate:
desc: Generate TestQL scenarios from project structure
cmds:
- testql generate . --output-dir {{.TESTQL_DIR}}
run:
desc: Run a TestQL scenario
cmds:
- testql run {{.CLI_ARGS}}
run-all:
desc: Run all generated TestQL scenarios
cmds:
- for file in {{.TESTQL_DIR}}/*.testql.toon.yaml; do testql run "$file"; done
cli-test:
desc: Run CLI integration tests
cmds:
- testql run {{.TESTQL_DIR}}/generated-cli-tests.testql.toon.yaml
dry-run:
desc: Validate all scenarios without executing
cmds:
- for file in {{.TESTQL_DIR}}/*.testql.toon.yaml; do testql run "$file" --dry-run; done
clean:
desc: Remove generated test files
cmds:
- rm -f {{.TESTQL_DIR}}/generated-*.testql.toon.yaml
# Self-test: Run testql's own test scenarios
self-test:
desc: Run TestQL's own test scenarios
cmds:
- testql run testql/scenarios/tests/test-api.testql.toon.yaml
- testql run testql/scenarios/tests/test-encoder.testql.toon.yaml || true
# Echo: Generate AI-friendly project context
echo:
desc: Generate AI project context from toon + doql
cmds:
- testql echo --toon-path {{.TESTQL_DIR}} --doql-path app.doql.less --format text
echo:json:
desc: Generate AI context as JSON
cmds:
- testql echo --toon-path {{.TESTQL_DIR}} --doql-path app.doql.less --format json -o project-context.json
sumd:
desc: Generate SUMD.md from project context
cmds:
- testql echo --toon-path {{.TESTQL_DIR}} --doql-path app.doql.less --format sumd -o SUMD.md
- echo "✅ Generated SUMD.md"
from-sumd:
desc: Generate testql scenarios from SUMD.md
cmds:
- testql from-sumd SUMD.md --dry-run
from-sumd:save:
desc: Save testql scenarios from SUMD.md
cmds:
- testql from-sumd SUMD.md -o {{.TESTQL_DIR}}/from-sumd.testql.toon.yaml
- echo "✅ Saved to {{.TESTQL_DIR}}/from-sumd.testql.toon.yaml"
# OpenAPI: Generate API specifications
openapi:
desc: Generate OpenAPI spec from endpoints
cmds:
- testql openapi . --format yaml
openapi:json:
desc: Generate OpenAPI spec as JSON
cmds:
- testql openapi . --format json --contract-tests
# Endpoints: List detected API endpoints
endpoints:
desc: List all detected API endpoints
cmds:
- testql endpoints . --format table
endpoints:json:
desc: List endpoints as JSON
cmds:
- testql endpoints . --format json
# Report: Generate HTML reports
report:example:
desc: Generate example HTML report
cmds:
- testql report --example -o report.html
- echo "✅ Report: file://$(pwd)/report.html"
report:
desc: Generate HTML report from data.json
cmds:
- testql report data.json -o report.html
- echo "✅ Report: file://$(pwd)/report.html"