scripts/e2e-test-report.sh > src/docs/e2e-test-report-generated-section.adoc
E2E Test Plan — Bausteinsicht CLI
1. Purpose
Reusable, comprehensive end-to-end test plan for all Bausteinsicht CLI workflows. Run periodically (at least before each release) to catch regressions and edge-case bugs that unit tests miss.
Test reports are stored as: src/docs/e2e-test-report-YYYY-MM-DD.adoc
2. Automation Status
Cross-checked 2026-07-03 against the automated Go suite in e2e/.go (subprocess-level, black-box CLI tests — the same class of test this plan describes; unit tests in internal//*_test.go and cmd/bausteinsicht/*_test.go are a separate, complementary layer and are not* counted here, per this doc’s own stated purpose of catching what unit tests miss).
This is a grep/keyword-based pass, not an exhaustive row-by-row audit — treat percentages as directional, not exact. #519 closed all 10 gap sections on its list (2, 4.4-4.7, 4.16-4.18, 5, 6.25-6.30, 9, 10, 11, 12, 13, 14, 15), including section 2 (Validate), which had been marked optional/low-priority.
| Section | Name | Tests | Automated in e2e/*.go |
Notes |
|---|---|---|---|---|
1 |
Basic Workflow |
6 |
~2/6 |
|
2 |
Validate |
25 |
25/25 |
Closed by #519 ( |
3 |
Forward Sync |
23 |
~5/23 |
|
4 |
Reverse Sync + Conflicts |
22 |
~10/22 |
Conflict resolution itself is well covered ( |
5 |
Views / Wildcards / Scope / Lifting |
28 |
28/28 |
Closed by #519 ( |
6 |
CLI Add Commands |
30 |
~9/30 |
Basic add-element/relationship flows are exercised as setup; JSONC comment preservation after |
7 |
Watch Mode |
10 |
~1/10 |
|
8 |
Export (PNG/SVG) |
12 |
~2/12 |
Only the draw.io-not-found error path (8.9, added this session) is deterministic; the rest depend on a real draw.io CLI + headless display and mostly skip in CI |
8b |
Export-Diagram |
10 |
~9/10 |
Well covered after this session’s work (plantuml/mermaid/structurizr/dot/d2/html); only the |
8c |
Export-Table |
6 |
~5/6 |
Well covered after this session’s work |
8d |
Export-Sequence |
4 |
~3/4 |
Covered by |
9 |
Draw.io File Integrity |
5 |
5/5 |
Closed by #519 ( |
10 |
Security / Injection Testing |
9 |
9/9 |
Closed by #519 ( |
11 |
CLI Flag Interactions |
9 |
9/9 |
Closed by #519 ( |
12 |
Sync State Edge Cases |
6 |
6/6 |
Closed by #519 ( |
13 |
Model File Edge Cases |
7 |
7/7 |
Closed by #519 ( |
14 |
Template Handling |
6 |
6/6 |
Closed by #519 ( |
15 |
Error Output Formatting |
8 |
8/8 |
Closed by #519 ( |
16 |
Analysis & Inspection |
15 |
~11/15 |
Well covered after this session’s work ( |
17 |
Evolution & Snapshots |
9 |
~6/9 |
|
18 |
Model Tooling & Import |
16 |
~11/16 |
Well covered after this session’s work ( |
19 |
Interactive, Overlay & ADR |
7 |
~6/7 |
Well covered after this session’s work ( |
20 |
Language Server (LSP) |
6 |
0/6 |
Brand new section (this session) — |
3. Before You Start
3.1. Pre-Requisites
-
Build the CLI:
make build -
Verify draw.io CLI is available:
drawio-export --version(devcontainer) ordrawio --version -
Ensure
xmllintis available for XML well-formedness checks
3.2. Updating This Test Plan
|
Important
|
Before executing the tests, check whether new commands, flags, or features have been added since the last update of this document. |
-
Run
./bausteinsicht --helpand compare all listed commands against Sections 1–19 of this document. -
For each command, run
./bausteinsicht <command> --helpand compare all flags against the test sections. -
If a new command or flag exists that has NO corresponding test section or test case:
-
Add a new section or extend an existing section with test cases for the missing functionality.
-
Commit the updated test plan BEFORE executing the tests.
-
-
If a command or flag has been removed, mark the corresponding test cases as
OBSOLETE(do not delete — keep for history).
3.3. How to Execute
-
Work through each section below in order.
-
For each test, use a fresh temporary directory:
dir=$(mktemp -d) && cd "$dir" -
Mark results:
PASS,FAIL(with issue number),SKIP(with reason) -
File a GitHub issue for each new failure immediately after discovering it.
-
Record results in a new test report file:
src/docs/e2e-test-report-YYYY-MM-DD.adoc
3.4. Generating a Line-Accurate Report Automatically
Added in #519. For lines already covered by an automated e2e/*_test.go test, scripts/e2e-test-report.sh
generates the mechanical PASS/FAIL/SKIP-per-line table straight from a real go test ./e2e/… run — no need to
hand-transcribe results for those lines into the report file above:
It cross-references go test -json output against internal/e2eplan.Registry plus an auto-detected naming
convention (see that package’s doc comment): name a subtest t.Run("<planID>_<Description>", …) — e.g.
t.Run("5.1_ExactMatch", …) — and it’s picked up with no registry entry needed. Lines with no matching test
report as SKIP: not automated, which doubles as a to-do list for future automation work (same information the
"Automation Status" table above summarizes per-section). It does not replace the narrative Environment/Failures/
Skips write-up a manual report round needs — only the mechanical per-line table.
3.5. Result Template
Copy this table into the test report:
[cols="1,1,1,1,1"]
|===
| Section | Tests | Pass | Fail | Skip
| 1. Basic Workflow | 6 | | |
| 2. Validate | 25 | | |
| 3. Forward Sync | 23 | | |
| 4. Reverse Sync + Conflicts | 22 | | |
| 5. Views / Wildcards / Scope / Lifting | 28 | | |
| 6. CLI Add Commands | 30 | | |
| 7. Watch Mode | 10 | | |
| 8. Export | 12 | | |
| 8b. Export-Diagram | 10 | | |
| 8c. Export-Table | 6 | | |
| 8d. Export-Sequence | 4 | | |
| 9. Draw.io File Integrity | 5 | | |
| 10. Security / Injection Testing | 9 | | |
| 11. CLI Flag Interactions | 9 | | |
| 12. Sync State Edge Cases | 6 | | |
| 13. Model File Edge Cases | 7 | | |
| 14. Template Handling | 6 | | |
| 15. Error Output Formatting | 8 | | |
| 16. Analysis & Inspection | 15 | | |
| 17. Evolution & Snapshots | 9 | | |
| 18. Model Tooling & Import | 16 | | |
| 19. Interactive, Overlay & ADR | 7 | | |
| 20. Language Server (LSP) | 6 | | |
| **Total** | **279** | | |
|===
4. 1. Basic Workflow (6 tests)
| # | Test | Steps | Expected |
|---|---|---|---|
1.1 |
Init in fresh dir |
|
4 files created (architecture.jsonc, template.drawio, architecture.drawio, .bausteinsicht-sync) |
1.2 |
Double init |
Run |
Error: file already exists |
1.3 |
Init in read-only dir |
|
Permission denied error |
1.4 |
Validate after init |
|
"Model is valid." |
1.5 |
Sync after init |
|
"Already in sync. No changes." |
1.6 |
Init |
|
Valid JSON with |
5. 2. Validate (25 tests)
| # | Test | Input | Expected |
|---|---|---|---|
2.1 |
Empty JSON |
|
Warning or error (no spec/model) |
2.2 |
Spec without model |
Only |
Valid |
2.3 |
Model without spec |
Only |
Error: unknown kind |
2.4 |
Unknown element kind |
kind "microservice" not in spec |
Error |
2.5 |
Rel where |
|
Error |
2.6 |
Rel where |
|
Error |
2.7 |
Empty relationships |
Valid |
|
2.8 |
Empty views |
Valid |
|
2.9 |
|
|
|
2.10 |
|
|
|
2.11 |
Non-existent model file |
|
File not found error |
2.12 |
Model path is directory |
|
"is a directory" error |
2.13 |
View scope referencing non-existent element |
Error |
|
2.14 |
View include referencing non-existent element |
|
Warning or error (not silently ignored) |
2.15 |
View exclude referencing non-existent element |
|
Warning or error |
2.16 |
Duplicate IDs at different nesting levels |
|
Valid (different paths) |
2.17 |
Unknown relationship kind |
|
Error |
2.18 |
Empty string element ID |
|
Error |
2.19 |
Whitespace-only element ID |
|
Error |
2.20 |
|
File is just |
Error |
2.21 |
|
Error: unknown format |
|
2.22 |
|
JSON output (case-insensitive) or clear error |
|
2.23 |
Malformed JSON |
Clear parse error |
|
2.24 |
500 elements stress test |
<1s, valid |
|
2.25 |
Deep nesting (6 levels) |
Valid |
6. 3. Forward Sync (23 tests)
| # | Test | Steps | Expected |
|---|---|---|---|
3.1 |
Add element, sync |
Add to model + view include, sync |
Element in drawio with correct style |
3.2 |
Add 2 elements simultaneously |
Both appear |
|
3.3 |
Long ID (120 chars) |
Accepted, synced |
|
3.4 |
Remove ALL elements, sync |
All pages cleaned |
|
3.5 |
Add element back after removal |
Fresh creation |
|
3.6 |
Add relationship, sync |
Connector rendered |
|
3.7 |
Remove source element of relationship |
Element + connector removed |
|
3.8 |
Long relationship label (500 chars) |
No truncation |
|
3.9 |
Multiple rels between same pair |
A→B "uses" + A→B "sends" |
Both connectors rendered |
3.10 |
Bidirectional relationships |
A→B + B→A |
Both render |
3.11 |
Self-referencing relationship |
A→A |
Connector created |
3.12 |
3 levels of nesting, sync |
system→container→component |
All levels correct |
3.13 |
Delete middle nesting level |
Re-parenting works |
|
3.14 |
Move element between parents |
Old removed, new created |
|
3.15 |
Sync 5x without changes |
All "Already in sync" |
|
3.16 |
Incremental add/remove across syncs |
Correct state |
|
3.17 |
No duplicates after 5 cycles |
Exactly 1 instance |
|
3.18 |
Delete drawio file, then sync |
Recreate or clear error |
|
3.19 |
Corrupt drawio file, then sync |
Random text in drawio |
Error, model untouched |
3.20 |
Delete sync state, then sync |
No duplicates |
|
3.21 |
Element in all 3 views |
Appears on all pages |
|
3.22 |
Remove element from one view |
Only removed from that page |
|
3.23 |
10 add+sync cycles: XML well-formedness |
xmllint after each |
Valid XML |
7. 4. Reverse Sync + Conflicts (22 tests)
| # | Test | Steps | Expected |
|---|---|---|---|
4.1 |
Change label in drawio, sync |
Edit |
Model title updated |
4.2 |
Change description (tooltip) |
Model description updated |
|
4.3 |
Change technology |
Model technology updated |
|
4.4 |
HTML entities in label |
|
Properly decoded in model |
4.5 |
Bold HTML tags in label |
|
Tags stripped |
4.6 |
Line breaks in label |
|
Handled gracefully |
4.7 |
Empty string label |
Set |
Warning or reject (not silent) |
4.8 |
Conflict: same field both sides |
Model wins + warning |
|
4.9 |
Different fields changed |
Title in model, desc in drawio |
Both applied |
4.10 |
Multiple fields in drawio only |
All updated in model |
|
4.11 |
Delete element from drawio |
Removed from model + rels |
|
4.12 |
Delete connector from drawio |
Relationship removed |
|
4.13 |
Delete element with relationships |
Element + all rels removed |
|
4.14 |
Change connector label |
Label updated in model |
|
4.15 |
Change connector source/target |
Old rel removed, new created |
|
4.16 |
|
Count before = count after |
|
4.17 |
|
Preserved after sync |
|
4.18 |
Trailing commas preserved |
Maintained |
|
4.19 |
3 rapid consecutive syncs |
Idempotent after first |
|
4.20 |
Multiple elements changed simultaneously |
All updated |
|
4.21 |
No double WARNING prefix |
Conflict message starts with "Conflict detected" (not "WARNING: WARNING:") |
|
4.22 |
View references cleaned on element delete |
Removed from include/exclude |
8. 5. Views / Wildcards / Scope / Lifting (28 tests)
| # | Test | Include/Exclude | Expected |
|---|---|---|---|
5.1 |
Exact match |
|
Only webshop |
5.2 |
Single wildcard |
|
Direct children |
5.3 |
Double wildcard |
|
All descendants |
5.4 |
Bare |
|
All top-level |
5.5 |
Bare |
|
Everything |
5.6 |
Nested wildcard |
|
cart + catalog |
5.7 |
Explicit list |
|
Exactly those two |
5.8 |
Mixed wildcard + explicit |
|
Combined |
5.9 |
Exclude single element |
Include |
Element removed |
5.10 |
Exclude nested wildcard |
Include |
Correct |
5.11 |
Exclude descendants |
Include |
Children excluded, not parent |
5.12 |
Scope with valid element |
|
Boundary box |
5.13 |
Scope with non-existent element |
Blocking validation error ("does not resolve to an existing element"), sync exits 1 — not a soft warning; see #176 |
|
5.14 |
Scope with empty include |
Only boundary |
|
5.15 |
Direct + lifted relationships |
Direct has priority |
|
5.16 |
Lifted to parent |
Label preserved |
|
5.17 |
Direct deep relationship |
Correct connector |
|
5.18 |
Transitive chain |
No transitive lifting |
|
5.19 |
Two views with overlapping elements |
Both pages have element |
|
5.20 |
Remove view from model, sync |
Page removed from drawio |
|
5.21 |
Rename view key |
Old page removed, new added |
|
5.22 |
Empty include |
Empty page |
|
5.23 |
Nonexistent element in include, as a wildcard pattern (e.g. |
Empty page — note: a literal nonexistent ID (no |
|
5.24 |
Include = exclude (cancel out) |
Empty page |
|
5.25 |
Duplicate entries in include |
|
Deduplicated |
5.26 |
Trailing dot |
Blocking validation error ("element does not exist") — not a silent empty page; the #176 fix ("typos like 'customer.' silently remove elements from draw.io") turned this into a hard error |
|
5.27 |
Just dots |
Blocking validation error ("element does not exist"), same #176 protection |
|
5.28 |
3 views, add element to all |
Element on all 3 pages |
9. 6. CLI Add Commands (30 tests)
| # | Test | Command | Expected |
|---|---|---|---|
6.1 |
Basic add element |
|
Success |
6.2 |
Duplicate ID |
Same ID twice |
Error |
6.3 |
Empty ID |
Rejected |
|
6.4 |
ID with space |
Rejected |
|
6.5 |
Dotted ID |
Rejected |
|
6.6 |
Empty title |
Rejected |
|
6.7 |
Unknown kind |
Error with valid kinds listed |
|
6.8 |
Valid parent |
|
Success |
6.9 |
Invalid parent |
|
Error |
6.10 |
Numeric-starting ID |
Rejected |
|
6.11 |
camelCase / UPPER / single-char IDs |
Accepted |
|
6.12 |
No flags at all |
|
Missing required flags error |
6.13 |
All optional flags |
|
All stored in model |
6.14 |
|
Valid JSON with id, kind, title, technology, description |
|
6.15 |
Basic add relationship |
|
Success |
6.16 |
Self-referencing relationship |
|
Accepted |
6.17 |
Non-existent from/to |
Error |
|
6.18 |
Empty label |
|
Accepted |
6.19 |
Very long label (1000 chars) |
Accepted |
|
6.20 |
Special chars in label |
|
Escaped correctly |
6.21 |
Duplicate relationship |
Same from+to twice |
Rejected with error |
6.22 |
|
Valid JSON |
|
6.23 |
Dot notation nested elements |
|
Works |
6.24 |
Unknown relationship kind |
Rejected |
|
6.25 |
|
Count before/after |
Same |
6.26 |
|
Preserved |
|
6.27 |
Trailing commas preserved |
Maintained |
|
6.28 |
Mixed comments after add |
All preserved |
|
6.29 |
Two sequential adds |
Both elements + comments intact |
|
6.30 |
Add relationship preserves comments |
No comment loss |
10. 7. Watch Mode (10 tests)
| # | Test | Steps | Expected |
|---|---|---|---|
7.1 |
Detects model changes |
Start watch, modify model, wait 3s |
Sync triggered |
7.2 |
Detects drawio changes |
Start watch, modify drawio XML, wait 3s |
Reverse sync triggered |
7.3 |
Debounce (5 rapid saves) |
5 writes within 500ms |
Single sync |
7.4 |
Recovery from invalid model |
Write invalid JSON, wait, restore valid |
Error then recovery |
7.5 |
|
|
Works same as default |
7.6 |
Non-existent model |
|
Immediate error |
7.7 |
Clean exit on SIGINT |
|
"Stopped watching." (exit 0) |
7.8 |
File delete + recreate |
Delete model, recreate, modify |
Watch continues detecting changes |
7.9 |
|
|
|
7.10 |
|
|
Mermaid markdown written to the custom path, not the default |
11. 8. Export (12 tests)
| # | Test | Steps | Expected |
|---|---|---|---|
8.1 |
Export all views as PNG |
|
One PNG per view page |
8.2 |
Export all views as SVG |
|
One SVG per view page |
8.3 |
Export single view |
|
Only one file for context view |
8.4 |
Export non-existent view |
|
Error: view not found |
8.5 |
Export to custom output dir |
|
Files created in |
8.6 |
Export to non-existent dir |
|
Dir created or clear error |
8.7 |
Export |
|
JSON output listing exported files |
8.8 |
Export with |
|
PNG contains embedded draw.io XML |
8.9 |
Export without draw.io CLI |
|
Clear error: draw.io CLI not found |
8.10 |
Export after init (no custom elements) |
Init, export |
Exports default diagram |
8.11 |
Export after multiple syncs |
Add elements, sync 3x, export |
Exported image matches current state |
8.12 |
Output filename convention |
Export all views |
Files named |
12. 8b. Export-Diagram (10 tests)
export-diagram renders views as C4 text diagrams (folded back from the 2026-03-05 report, Round 7).
| # | Test | Command | Expected |
|---|---|---|---|
8b.1 |
Export view as C4-PlantUML |
|
C4-PlantUML text on stdout |
8b.2 |
Export view as Mermaid |
|
Mermaid C4 text on stdout |
8b.3 |
|
|
JSON wrapper, not plain text (regression #241) |
8b.4 |
Unknown diagram format |
|
Error: unknown diagram format |
8b.5 |
Non-existent view |
|
Error: view not found |
8b.6 |
Structurizr workspace export |
|
Single |
8b.7 |
Export as Graphviz DOT |
|
|
8b.8 |
Export as D2 |
|
|
8b.9 |
Export as interactive HTML |
|
One |
8b.10 |
|
|
JSON wrapper with |
13. 8c. Export-Table (6 tests)
export-table renders element attributes per view as a table (folded back from the 2026-03-05 report, Round 7).
| # | Test | Command | Expected |
|---|---|---|---|
8c.1 |
Export as AsciiDoc table |
|
AsciiDoc table on stdout |
8c.2 |
Export as Markdown table |
|
Markdown table on stdout |
8c.3 |
|
|
JSON output, not plain text (regression #239) |
8c.4 |
Non-existent view |
|
Error: view not found |
8c.5 |
Combined across views |
|
All elements across views, deduplicated |
8c.6 |
All views, not combined |
|
Single file |
14. 8d. Export-Sequence (4 tests)
export-sequence renders dynamic views as sequence diagrams.
| # | Test | Command | Expected |
|---|---|---|---|
8d.1 |
Export dynamic view as PlantUML |
|
PlantUML sequence on stdout |
8d.2 |
Export as Mermaid |
|
Mermaid sequence on stdout |
8d.3 |
Unknown dynamic view |
|
Error: dynamic view not found |
8d.4 |
Model without dynamicViews |
|
"No dynamic views defined in model." on stderr, exit 0 |
15. 9. Draw.io File Integrity (5 tests)
| # | Test | Steps | Expected |
|---|---|---|---|
9.1 |
XML well-formedness after 10 cycles |
Add element + sync x10, xmllint each |
Valid XML every time |
9.2 |
No orphaned connectors |
Add rels, remove middle element, sync |
No dangling edges |
9.3 |
Style consistency |
5 elements same kind |
Identical styles |
9.4 |
Page structure (base cells) |
After 10 cycles |
Exactly one mxCell 0 and 1 per page |
9.5 |
mxGraphModel attributes |
After 10 cycles |
dx, dy, grid, etc. preserved |
16. 10. Security / Injection Testing (9 tests)
| # | Test | Input | Expected |
|---|---|---|---|
10.1 |
XML injection via title |
|
Escaped, XML well-formed |
10.2 |
XML injection via description |
|
No attribute injection |
10.3 |
XML injection via rel label |
|
No injected elements |
10.4 |
CDATA injection |
|
XML integrity maintained |
10.5 |
Unicode null bytes in title |
|
Handled gracefully |
10.6 |
Very long string (100K chars) |
No crash |
|
10.7 |
Path traversal via |
|
"not found" error |
10.8 |
Shell injection via element ID |
|
Rejected by ID regex |
10.9 |
JSON injection in model |
|
Literal string value |
17. 11. CLI Flag Interactions (9 tests)
| # | Test | Command | Expected |
|---|---|---|---|
11.1 |
|
|
More detail than non-verbose |
11.2 |
|
|
More detail |
11.3 |
|
|
More detail |
11.4 |
|
|
Clear parse error |
11.5 |
|
|
Error (not silent fallback) |
11.6 |
|
Valid JSON (verbose doesn’t break JSON structure) |
|
11.7 |
Both model+template non-existent |
Clear error |
|
11.8 |
|
init, sync, validate, watch, add element, add relationship, export |
Help text, exit 0 |
11.9 |
Unknown flag |
|
Error: unknown flag |
18. 12. Sync State Edge Cases (6 tests)
| # | Test | Setup | Expected |
|---|---|---|---|
12.1 |
Corrupt sync state |
|
Clear parse error |
12.2 |
Extra/stale entries |
Fake elements in sync state |
Cleaned up gracefully |
12.3 |
Missing entries |
Remove some from sync state |
No duplicates created |
12.4 |
Empty sync state |
No duplicates, rebuilds state |
|
12.5 |
Empty file (0 bytes) |
Treated the same as a missing file (empty state, no error) — internal/sync/state.go:60-65 explicitly handles "e.g. truncated write"; not a "Clear error" as originally stated here |
|
12.6 |
JSON array instead of object |
|
Clear type error |
19. 13. Model File Edge Cases (7 tests)
| # | Test | Input | Expected |
|---|---|---|---|
13.1 |
UTF-8 BOM |
|
Stripped or clear error mentioning BOM |
13.2 |
Windows line endings |
Works |
|
13.3 |
Mixed line endings |
Works |
|
13.4 |
Tab indentation |
Works |
|
13.5 |
No trailing newline |
Works |
|
13.6 |
Minified (single-line) JSON |
Works |
|
13.7 |
100 elements performance |
<1s for validate + sync |
20. 14. Template Handling (6 tests)
| # | Test | Steps | Expected |
|---|---|---|---|
14.1 |
Custom template via |
|
Styles from custom template used |
14.2 |
Template without required styles |
Empty template |
Clear error or default styles |
14.3 |
Template is not valid draw.io XML |
Random text |
Clear parse error |
14.4 |
Template path doesn’t exist |
|
File not found error |
14.5 |
Init creates template.drawio |
|
template.drawio contains valid draw.io XML with element styles |
14.6 |
Init blocked by existing template |
Pre-create template.drawio, then |
Error: file already exists |
21. 15. Error Output Formatting (8 tests)
| # | Test | Command | Expected |
|---|---|---|---|
15.1 |
Error as JSON (validate) |
|
|
15.2 |
Error as JSON (sync) |
|
|
15.3 |
Error as JSON (add element) |
|
|
15.4 |
Error as JSON (export) |
|
|
15.5 |
Error as text (default) |
|
Plain text error on stderr |
15.6 |
Error exit codes |
Various error commands |
exit code 1 for user errors, 2 for system errors |
15.7 |
Success JSON output consistency |
|
All valid JSON, parseable by |
15.8 |
No mixed stdout/stderr |
Error command with |
JSON error on stderr only, no text on stdout |
22. 16. Analysis & Inspection Commands (15 tests)
Covers lint, health, graph, stale, status, find, show.
| # | Test | Command | Expected |
|---|---|---|---|
16.1 |
Lint passes a clean model |
|
Exit 0, no violations |
16.2 |
Lint reports a violation |
|
Exit 1, violation listed with constraint ID |
16.3 |
Health score |
|
Completeness/conformance/complexity score |
16.4 |
Health requires |
|
Error (health does not auto-detect — deviates from the global convention) |
16.5 |
Graph analysis |
|
Cycles and dependency depth reported (centrality only with |
16.6 |
Graph |
|
Machine-readable graph metrics |
16.7 |
Stale with threshold |
|
Elements older than 90 days without status/ADR flagged |
16.8 |
Stale outside git |
|
Graceful: nothing flagged |
16.9 |
Stale |
|
JSON with |
16.10 |
Stale |
Sync a stale element into drawio, |
Risk-color fill applied to the stale element’s |
16.11 |
Stale |
After 16.10, |
Original fill/stroke restored, marker attributes removed (idempotent — a second |
16.12 |
Status grouping |
|
Elements grouped/sorted by lifecycle status ( |
16.13 |
Find full-text |
|
Matching elements/relationships/views |
16.14 |
Show element details |
|
All fields of the element |
16.15 |
Show non-existent element |
|
Error: element not found |
23. 17. Evolution & Snapshots (9 tests)
Covers snapshot (save/list/diff/restore/delete), diff, changelog.
| # | Test | Command | Expected |
|---|---|---|---|
17.1 |
Save snapshot |
|
Snapshot written to |
17.2 |
List snapshots |
|
Saved snapshots listed with their timestamp IDs |
17.3 |
Diff snapshots |
|
Element/relationship changes between snapshots |
17.4 |
Restore snapshot |
|
Model restored to snapshot state |
17.5 |
Restore over existing output |
|
Exit 2: output exists (use |
17.6 |
Delete snapshot |
|
Snapshot removed |
17.7 |
Diff as-is vs to-be |
|
Differences reported |
17.8 |
Diff without sections |
|
Error: model does not contain asIs and toBe sections |
17.9 |
Changelog |
|
Architecture changelog between versions (git-based) |
24. 18. Model Tooling & Import (16 tests)
Covers import, generate-template, layout, schema, workspace.
| # | Test | Command | Expected |
|---|---|---|---|
18.1 |
Import Structurizr DSL |
|
|
18.2 |
Import LikeC4 |
|
|
18.3 |
Import unknown format |
|
Exit 1: unknown format |
18.4 |
Import over existing output |
|
Exit 2 unless |
18.5 |
Generate template |
|
|
18.6 |
Generate template invalid style |
|
Error: invalid style |
18.7 |
Layout |
|
Element positions written back to the draw.io file |
18.8 |
Schema generate |
|
Schema written to |
18.9 |
Schema in sync with types |
|
No diff (committed schema matches Go types) |
18.10 |
Workspace validate |
|
JSON workspace config validated |
18.11 |
Workspace merge |
|
Combined model written |
18.12 |
Import XMI (EA export) |
|
|
18.13 |
Import XMI with |
|
Overridden kinds applied instead of the built-in defaults; overridden kinds are registered in |
18.14 |
Import XMI with EA stereotype |
XMI element carrying an |
Stereotype wins over the UML type mapping and any |
18.15 |
Import XMI, Windows-1252 encoded |
XMI file with a |
Correctly transcoded to UTF-8 in the resulting model — no mangled characters |
18.16 |
Import XMI path traversal in |
XMI/DSL referencing |
Rejected with a path-traversal warning; import continues without the escaping file |
25. 19. Interactive, Overlay & ADR (7 tests)
Covers repl, overlay (apply/list/remove), adr (list/show).
| # | Test | Command | Expected |
|---|---|---|---|
19.1 |
REPL add + save |
|
Model updated; validated before save |
19.2 |
REPL exit with unsaved changes |
|
Confirmation prompt before quitting |
19.3 |
Overlay list metrics |
|
Available metrics listed |
19.4 |
Overlay apply |
|
Heatmap overlaid; output next to the model |
19.5 |
Overlay with no model |
|
Error loading model (overlay reads |
19.6 |
ADR list |
|
Linked ADRs listed |
19.7 |
ADR show / filter |
|
ADR details / ADRs for that element |
26. 20. Language Server (LSP) (6 tests)
bausteinsicht-lsp is a separate binary (cmd/bausteinsicht-lsp), not a subcommand of bausteinsicht — it implements the Language Server Protocol over stdio for IDE integration (JSON Schema-backed completion/diagnostics while editing .jsonc models), corresponding to the bausteinsicht.lsp container and its ide → bausteinsicht.model / bausteinsicht.lsp → bausteinsicht.model relationships in this project’s own architecture model (src/docs/arc42/architecture.jsonc). It had zero E2E coverage before this section existed — the main e2e/ suite only builds and exercises the bausteinsicht binary, never bausteinsicht-lsp.
Testing it means sending newline/Content-Length-framed JSON-RPC messages over the process’s stdin and reading responses from stdout (not plain CLI args/stdout text like every other section in this plan).
| # | Test | Steps | Expected |
|---|---|---|---|
20.1 |
|
Send an |
Valid |
20.2 |
|
Open a |
A |
20.3 |
|
Open a valid document, then send a change introducing an error |
New |
20.4 |
|
Save-triggered validation path, distinct from |
Diagnostics consistent with on-disk content |
20.5 |
|
Send |
Process exits cleanly (exit 0), no diagnostics sent after shutdown |
20.6 |
|
Start with |
Debug logging appears on stderr (silently discarded to |
27. Test History
Record each test execution here:
| Date | Round | Tests | Bugs Found | Report |
|---|---|---|---|---|
2026-03-01 |
1+2 |
73 |
18 (#107-#124) |
|
2026-03-02 |
3 |
221 |
12 (#140-#151) |
|
2026-03-02 |
4 |
147 |
5 (#165-#169) |
|
2026-03-02 |
5 |
204 |
4 (#175-#178) |
|
2026-03-02 |
6 |
211 |
7 (#183-#189) |
|
2026-03-05 |
7 |
215 |
6 (#236-#241) |
|
2026-07-03 |
8 (automated) |
116 newly automated (279 total tracked) |
1 (#520) |
|
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.