-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequirements.yaml
More file actions
181 lines (167 loc) · 8.6 KB
/
requirements.yaml
File metadata and controls
181 lines (167 loc) · 8.6 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# Requirements Testing Strategy
#
# This project uses three categories of tests to verify requirements:
#
# 1. Unit Tests - Run locally via "dotnet test"
# 2. Self-Validation Tests - Run locally via "--validate"
# 3. Platform Tests - Run via CI/CD across OS/runtime matrix
#
# NOTE: Running "reqstream --enforce" with only local test results (unit tests
# and local self-validation) is expected to show some unsatisfied requirements.
# Platform-specific requirements require test results from CI/CD runs across
# the full OS and runtime matrix.
#
# Test links can include a source filter prefix (e.g. "windows@", "ubuntu@", "net8.0@",
# "dotnet8.x@") to restrict which test results count as evidence for a requirement. This
# is critical for platform and framework requirements - removing these filters invalidates
# the evidence-based proof.
#
# Source filter prefixes:
# windows@TestName - proves the test passed on a Windows platform
# ubuntu@TestName - proves the test passed on a Linux (Ubuntu) platform
# net8.0@TestName - proves the test passed under the .NET 8 target framework
# net9.0@TestName - proves the test passed under the .NET 9 target framework
# net10.0@TestName - proves the test passed under the .NET 10 target framework
# dotnet8.x@TestName - proves the self-validation test ran with .NET 8.x runtime
# dotnet9.x@TestName - proves the self-validation test ran with .NET 9.x runtime
# dotnet10.x@TestName - proves the self-validation test ran with .NET 10.x runtime
#
---
sections:
- title: Template DotNet Tool Requirements
sections:
- title: Command-Line Interface
requirements:
- id: TMPL-REQ-001
title: The tool shall implement a Context class for command-line argument handling.
justification: |
Provides a standardized approach to command-line argument parsing and output
handling across all DEMA Consulting DotNet Tools.
tests:
- Context_Create_NoArguments_ReturnsDefaultContext
- Context_Create_VersionFlag_SetsVersionTrue
- Context_Create_HelpFlag_SetsHelpTrue
- Context_Create_SilentFlag_SetsSilentTrue
- Context_Create_ValidateFlag_SetsValidateTrue
- Context_Create_ResultsFlag_SetsResultsFile
- Context_Create_LogFlag_OpensLogFile
- id: TMPL-REQ-002
title: The tool shall support -v and --version flags to display version information.
justification: |
Users need to quickly identify the version of the tool they are using for
troubleshooting and compatibility verification.
tests:
- Context_Create_VersionFlag_SetsVersionTrue
- Context_Create_ShortVersionFlag_SetsVersionTrue
- Program_Run_WithVersionFlag_DisplaysVersionOnly
- Program_Version_ReturnsNonEmptyString
- IntegrationTest_VersionFlag_OutputsVersion
- id: TMPL-REQ-003
title: The tool shall support -?, -h, and --help flags to display usage information.
justification: |
Users need access to command-line usage documentation without requiring
external resources.
tests:
- Context_Create_HelpFlag_SetsHelpTrue
- Context_Create_ShortHelpFlag_H_SetsHelpTrue
- Context_Create_ShortHelpFlag_Question_SetsHelpTrue
- Program_Run_WithHelpFlag_DisplaysUsageInformation
- IntegrationTest_HelpFlag_OutputsUsageInformation
- id: TMPL-REQ-004
title: The tool shall support --silent flag to suppress console output.
justification: |
Enables automated scripts and CI/CD pipelines to run the tool without
cluttering output logs.
tests:
- Context_Create_SilentFlag_SetsSilentTrue
- Context_WriteLine_Silent_DoesNotWriteToConsole
- IntegrationTest_SilentFlag_SuppressesOutput
- id: TMPL-REQ-005
title: The tool shall support --validate flag to run self-validation tests.
justification: |
Provides a built-in mechanism to verify the tool is functioning correctly
in the deployment environment.
tests:
- Context_Create_ValidateFlag_SetsValidateTrue
- Program_Run_WithValidateFlag_RunsValidation
- IntegrationTest_ValidateFlag_RunsValidation
- id: TMPL-REQ-006
title: The tool shall support --results flag to write validation results in TRX or JUnit format.
justification: |
Enables integration with CI/CD systems that expect standard test result formats.
tests:
- Context_Create_ResultsFlag_SetsResultsFile
- IntegrationTest_ValidateWithResults_GeneratesTrxFile
- IntegrationTest_ValidateWithResults_GeneratesJUnitFile
- id: TMPL-REQ-007
title: The tool shall support --log flag to write output to a log file.
justification: |
Provides persistent logging for debugging and audit trails.
tests:
- Context_Create_LogFlag_OpensLogFile
- IntegrationTest_LogFlag_WritesOutputToFile
- id: TMPL-REQ-013
title: The tool shall write error messages to stderr.
justification: |
Error messages must be written to stderr so they remain visible to the user
without polluting stdout, which consumers may pipe or redirect for data capture.
tests:
- Context_WriteError_NotSilent_WritesToConsole
- IntegrationTest_UnknownArgument_ReturnsError
- id: TMPL-REQ-015
title: The tool shall return a non-zero exit code on failure.
justification: |
Callers (scripts, CI/CD pipelines) must be able to detect failure conditions
programmatically via the process exit code.
tests:
- Context_WriteError_SetsErrorExitCode
- IntegrationTest_UnknownArgument_ReturnsError
- id: TMPL-REQ-014
title: The tool shall reject unknown or malformed command-line arguments with a descriptive error.
justification: |
Providing clear feedback for invalid arguments helps users quickly correct
mistakes and prevents silent misconfiguration.
tests:
- Context_Create_UnknownArgument_ThrowsArgumentException
- Context_Create_LogFlag_WithoutValue_ThrowsArgumentException
- Context_Create_ResultsFlag_WithoutValue_ThrowsArgumentException
- IntegrationTest_UnknownArgument_ReturnsError
- title: Platform Support
requirements:
- id: TMPL-REQ-008
title: The tool shall build and run on Windows platforms.
justification: |
DEMA Consulting tools must support Windows as a major development platform.
tests:
# Tests link to "windows" to ensure results come from Windows platform
- "windows@TemplateTool_VersionDisplay"
- "windows@TemplateTool_HelpDisplay"
- id: TMPL-REQ-009
title: The tool shall build and run on Linux platforms.
justification: |
DEMA Consulting tools must support Linux for CI/CD and containerized environments.
tests:
# Tests link to "ubuntu" to ensure results come from Linux platform
- "ubuntu@TemplateTool_VersionDisplay"
- "ubuntu@TemplateTool_HelpDisplay"
- id: TMPL-REQ-010
title: The tool shall support .NET 8 runtime.
justification: |
.NET 8 is an LTS release providing long-term stability for enterprise users.
tests:
- "dotnet8.x@TemplateTool_VersionDisplay"
- "dotnet8.x@TemplateTool_HelpDisplay"
- id: TMPL-REQ-011
title: The tool shall support .NET 9 runtime.
justification: |
.NET 9 support enables users to leverage the latest .NET features.
tests:
- "dotnet9.x@TemplateTool_VersionDisplay"
- "dotnet9.x@TemplateTool_HelpDisplay"
- id: TMPL-REQ-012
title: The tool shall support .NET 10 runtime.
justification: |
.NET 10 support ensures the tool remains compatible with the latest .NET ecosystem.
tests:
- "dotnet10.x@TemplateTool_VersionDisplay"
- "dotnet10.x@TemplateTool_HelpDisplay"