Skip to content

Commit 6353e9f

Browse files
author
Anitha Varghese
committed
feat: author testcase using spry #55
2 parents bb46495 + da7b924 commit 6353e9f

8 files changed

Lines changed: 3591 additions & 19 deletions

File tree

content/docs/use-cases/audit-complains.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ By embedding tests directly in documentation, you ensure evidence collection is
4747

4848
## Test Steps
4949

50-
\`\`\`bash tc001-check-access --descr "Verify access controls are in place"
50+
```bash tc001-check-access --descr "Verify access controls are in place"
5151
#!/usr/bin/env -S bash
5252
set -e
5353

@@ -63,11 +63,11 @@ By embedding tests directly in documentation, you ensure evidence collection is
6363
done
6464

6565
echo "PASS: All current users are authorized"
66-
\`\`\`
66+
```
6767

6868
## Evidence Artifacts
6969

70-
\`\`\`bash tc001-capture-evidence -C ./evidence/tc001-results.json --gitignore
70+
```bash tc001-capture-evidence -C ./evidence/tc001-results.json --gitignore
7171
#!/usr/bin/env -S bash
7272
cat << EOF
7373
{
@@ -78,7 +78,7 @@ By embedding tests directly in documentation, you ensure evidence collection is
7878
"currentUserCount": $(who | wc -l)
7979
}
8080
EOF
81-
\`\`\`
81+
```
8282

8383
## Results
8484

content/docs/use-cases/devops-runbook.mdx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Executable runbooks capture DevOps procedures as code, making them testable, ver
3939

4040
## Pre-Flight Checks
4141

42-
\`\`\`bash check-git-status --descr "Verify clean git working directory"
42+
```bash check-git-status --descr "Verify clean git working directory"
4343
#!/usr/bin/env -S bash
4444
set -e
4545

@@ -50,9 +50,9 @@ Executable runbooks capture DevOps procedures as code, making them testable, ver
5050
fi
5151

5252
echo "OK: Git working directory is clean"
53-
\`\`\`
53+
```
5454

55-
\`\`\`bash check-tests --descr "Run test suite" --dep check-git-status
55+
```bash check-tests --descr "Run test suite" --dep check-git-status
5656
#!/usr/bin/env -S bash
5757
set -e
5858

@@ -65,11 +65,11 @@ Executable runbooks capture DevOps procedures as code, making them testable, ver
6565
echo "ERROR: Tests failed"
6666
exit 1
6767
fi
68-
\`\`\`
68+
```
6969

7070
## Build Phase
7171

72-
\`\`\`bash build-app --descr "Build production artifacts" --dep check-tests
72+
```bash build-app --descr "Build production artifacts" --dep check-tests
7373
#!/usr/bin/env -S bash
7474
set -e
7575

@@ -78,11 +78,11 @@ Executable runbooks capture DevOps procedures as code, making them testable, ver
7878

7979
echo "OK: Build completed successfully"
8080
ls -la dist/
81-
\`\`\`
81+
```
8282

8383
## Health Check
8484

85-
\`\`\`bash health-check --descr "Verify server health"
85+
```bash health-check --descr "Verify server health"
8686
#!/usr/bin/env -S bash
8787
set -e
8888

@@ -98,11 +98,11 @@ Executable runbooks capture DevOps procedures as code, making them testable, ver
9898
echo "ERROR: Server health check failed (HTTP $response)"
9999
exit 1
100100
fi
101-
\`\`\`
101+
```
102102

103103
## Deployment
104104

105-
\`\`\`bash deploy --descr "Deploy to production" --dep build-app,health-check
105+
```bash deploy --descr "Deploy to production" --dep build-app,health-check
106106
#!/usr/bin/env -S bash
107107
set -e
108108

@@ -115,11 +115,11 @@ Executable runbooks capture DevOps procedures as code, making them testable, ver
115115
ssh user@server 'systemctl restart app'
116116

117117
echo "OK: Deployment completed"
118-
\`\`\`
118+
```
119119

120120
## Post-Deployment Verification
121121

122-
\`\`\`bash verify-deployment --descr "Verify deployment success" --dep deploy
122+
```bash verify-deployment --descr "Verify deployment success" --dep deploy
123123
#!/usr/bin/env -S bash
124124
set -e
125125

@@ -134,19 +134,19 @@ Executable runbooks capture DevOps procedures as code, making them testable, ver
134134
echo "ERROR: Post-deployment verification failed"
135135
exit 1
136136
fi
137-
\`\`\`
137+
```
138138

139139
## Rollback (Manual)
140140

141-
\`\`\`bash rollback --descr "Rollback to previous version"
141+
```bash rollback --descr "Rollback to previous version"
142142
#!/usr/bin/env -S bash
143143
set -e
144144

145145
echo "Rolling back to previous version..."
146146
ssh user@server 'cd /var/www/app && git checkout HEAD~1 && systemctl restart app'
147147

148148
echo "Rollback completed"
149-
\`\`\`
149+
```
150150
````
151151

152152
<Callout>

content/docs/use-cases/meta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"pages": [
55
"audit-complains",
66
"sqlpage-data-app",
7-
"devops-runbook"
7+
"devops-runbook",
8+
"quality-testcase-template"
89
],
910
"root": true
1011
}
Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
---
2+
title: Authoring Executable Test Cases with Spry Axiom
3+
description: Detailed guide for QC teams to structure Markdown test documentation using the Spry Axiom engine.
4+
icon: FileCheck
5+
index: 4
6+
---
7+
8+
import { Callout } from 'fumadocs-ui/components/callout';
9+
import { Steps, Step } from 'fumadocs-ui/components/steps';
10+
import { Tabs, Tab } from 'fumadocs-ui/components/tabs';
11+
12+
The **Spry engine** uses a Heading-to-Role classification system. It treats Markdown headings as functional nodes in a database rather than just text styles. This enables automated SQL telemetry and audit-ready reporting.
13+
14+
15+
16+
<Callout type="info">
17+
**Visualize Structure:** To see the structure using the Spry Axiom Web-UI, use the command or navigation: `spry axiom web-ui [markdown file path]`
18+
</Callout>
19+
20+
## 1. The Core Architecture
21+
22+
Every file must begin with a `doc-classify` YAML block. This maps the visual depth of a heading (`#`, `##`, etc.) to a specific **Assurance Role**.
23+
24+
### Role Definitions
25+
- **Project**: The high-level objective/repository.
26+
- **Strategy**: Governance (e.g., ISO27001, SOC2, CMMC compliance).
27+
- **Plan**: Tactical execution window (e.g., Sprint 24, Q1 Release).
28+
- **Suite**: Logical grouping of functionality.
29+
- **Case**: The specific test logic and expected behavior.
30+
- **Evidence**: The lowest level containing logs, screenshots, or checkmarks.
31+
32+
---
33+
34+
## 2. Selection of Hierarchy Models
35+
36+
Depending on your project's complexity, you must choose one of the four standard models. **Consistency is key**: do not skip heading levels within a file.
37+
38+
| Model | H1 | H2 | H3 | H4 | H5 | H6 |
39+
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
40+
| **Small** | Project | Case | Evidence | - | - | - |
41+
| **Medium** | Project | Suite | Case | Evidence | - | - |
42+
| **Large** | Project | Plan | Suite | Case | Evidence | - |
43+
| **Complex** | Project | Strategy | Plan | Suite | Case | Evidence |
44+
45+
---
46+
47+
## 3. Implementation Samples
48+
49+
<Tabs items={['Small', 'Medium', 'Large', 'Complex']}>
50+
<Tab value="Small">
51+
### Small Model
52+
*Use for simple unit-level checks or quick smoke tests.*
53+
54+
[View Full Template (qf-small.md)](/qf-small.md)
55+
56+
```md
57+
---
58+
doc-classify:
59+
- select: heading[depth="1"]
60+
role: project
61+
- select: heading[depth="2"]
62+
role: case
63+
- select: heading[depth="3"]
64+
role: evidence
65+
---
66+
67+
# API Validation Project
68+
## Verify User Endpoint returns 200
69+
### Evidence
70+
- [x] Response status is 200 OK.
71+
```
72+
</Tab>
73+
74+
<Tab value="Medium">
75+
### Medium Model
76+
*The industry standard for feature-based regression testing.*
77+
78+
[View Full Template (qf-medium.md)](/qf-medium.md)
79+
80+
```md
81+
---
82+
doc-classify:
83+
- select: heading[depth="1"]
84+
role: project
85+
- select: heading[depth="2"]
86+
role: suite
87+
- select: heading[depth="3"]
88+
role: case
89+
- select: heading[depth="4"]
90+
role: evidence
91+
---
92+
93+
# E-Commerce Dashboard
94+
## Checkout Flow
95+
### TC-102: Guest Checkout with Credit Card
96+
#### Evidence
97+
- [x] Item added to cart.
98+
```
99+
</Tab>
100+
101+
<Tab value="Large">
102+
### Large Model
103+
*Use when managing multiple execution plans or sprints.*
104+
105+
[View Full Template (qf-large.md)](/qf-large.md)
106+
107+
```md
108+
---
109+
doc-classify:
110+
- select: heading[depth="1"]
111+
role: project
112+
- select: heading[depth="2"]
113+
role: plan
114+
- select: heading[depth="3"]
115+
role: suite
116+
- select: heading[depth="4"]
117+
role: case
118+
- select: heading[depth="5"]
119+
role: evidence
120+
---
121+
122+
# Finance App
123+
## Sprint 45 - Payment Rails
124+
### International Wire Transfers
125+
#### TC-W-01: Transfer to EU IBAN
126+
##### Evidence
127+
- [x] Currency conversion applied correctly.
128+
```
129+
</Tab>
130+
131+
<Tab value="Complex">
132+
### Complex Model
133+
*Mandatory for high-compliance environments (SOC2/CMMC).*
134+
135+
[View Full Template (qf-complex.md)](/qf-complex.md)
136+
137+
```md
138+
---
139+
doc-classify:
140+
- select: heading[depth="1"]
141+
role: project
142+
- select: heading[depth="2"]
143+
role: strategy
144+
- select: heading[depth="3"]
145+
role: plan
146+
- select: heading[depth="4"]
147+
role: suite
148+
- select: heading[depth="5"]
149+
role: case
150+
- select: heading[depth="6"]
151+
role: evidence
152+
---
153+
154+
# Opsfolio Infrastructure
155+
## CMMC Level 2 Compliance
156+
### Annual Security Audit 2025
157+
#### Access Control (AC)
158+
##### AC.L2-3.1.1: Limit Access
159+
###### Evidence
160+
- [x] RBAC configuration verified.
161+
```
162+
</Tab>
163+
</Tabs>
164+
165+
---
166+
167+
## 4. Advanced Metadata & Overrides
168+
169+
To make your QC reports more powerful, you can use **HFM (Header Frontmatter)** blocks or **ID tags** (`@id`) directly under headings.
170+
171+
- **ID Tagging**: Use `@id unique-id` to link cases across different documents.
172+
- **YAML Overrides**: Change the status or assignee of a specific case inline.
173+
174+
```md
175+
### Verify Password Complexity
176+
@id TC-AUTH-09
177+
{
178+
"role": "case",
179+
"priority": "high",
180+
"status": "passed",
181+
"assignee": "QC_Lead"
182+
}
183+
184+
```
185+
186+
---
187+
188+
## 5. QC Authoring Rules
189+
190+
<Steps>
191+
<Step>
192+
**Never Skip Levels**: If you are using the Medium model, don't jump from `#` directly to `###`.
193+
</Step>
194+
<Step>
195+
**One Project Per File**: Only one H1 (`#`) is allowed per document to ensure clean telemetry.
196+
</Step>
197+
<Step>
198+
**Evidence at the Leaf**: Always ensure the `evidence` role is the lowest level of your heading hierarchy.
199+
</Step>
200+
<Step>
201+
**GFM Compliance**: Use standard GitHub Flavored Markdown for checkboxes (`- [x]`) and tables.
202+
</Step>
203+
</Steps>
204+
205+
<Callout type="info">
206+
Properly structured files allow Qualityfolio to automatically build **Traceability Matrices** used for coverage reporting and risk analysis.
207+
</Callout>
208+
209+
210+

0 commit comments

Comments
 (0)