Skip to content

Commit d617ebe

Browse files
committed
tests/doc: add template for documenting test rationale and design
Signed-off-by: Adrian-Stanea <Adrian.Stanea@analog.com>
1 parent 4b91ec2 commit d617ebe

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

tests/doc/README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Test Design Documentation
2+
3+
This directory contains design documentation for tests in the libm2k test suite. Each document explains the rationale behind test design decisions, making it easier to understand, maintain, and extend the test suite.
4+
5+
## Purpose
6+
7+
- **Document design decisions** - Explain why tests are structured the way they are
8+
- **Capture domain knowledge** - Record hardware-specific considerations
9+
- **Enable maintenance** - Help future developers understand test intent
10+
- **Track issue references** - Link tests to the bugs/features they validate
11+
12+
## Document Structure
13+
14+
Each test document should follow this template:
15+
16+
```markdown
17+
# Test: [Test Name]
18+
19+
## Overview
20+
| Field | Value |
21+
| -------------------- | ------------------------------------ |
22+
| **Test Name** | `test_function_name` |
23+
| **Test File** | `tests/file.py` |
24+
| **Related Issue** | Link to GitHub issue (if applicable) |
25+
| **Minimum Firmware** | Version requirement (if applicable) |
26+
27+
## Problem Statement
28+
What problem or feature does this test validate?
29+
30+
## Test Configuration
31+
What parameters are used and why?
32+
33+
## Design Rationale
34+
Why was this approach chosen? What alternatives were considered?
35+
36+
## Expected Results
37+
What indicates pass/fail? What error messages mean what?
38+
39+
## Running the Test
40+
Command-line examples for running the test.
41+
42+
## Running the Test
43+
Instructions for running the test.
44+
45+
## References
46+
Links to issues, documentation, datasheets, etc.
47+
```
48+
49+
## Naming Convention
50+
51+
Documentation files should be named after the test method they document:
52+
- `test_dual_channel_waveform_sync.md`
53+
54+
## Index
55+
56+
| Document | Test | Description |
57+
| ------------------------------------------------------------------------ | --------------------------------- | -------------------------------------------- |
58+
| [test_dual_channel_waveform_sync.md](test_dual_channel_waveform_sync.md) | `test_dual_channel_waveform_sync` | Validates dual-channel phase synchronization |
59+

0 commit comments

Comments
 (0)