feat: add quality description to document TDD benefits for race condition tests
This commit is contained in:
parent
79f5ad10b6
commit
f51e65444f
5
docs/quality_description.md
Normal file
5
docs/quality_description.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Quality Description
|
||||||
|
|
||||||
|
Writing tests first forced every component to be injectable and independently exercisable before any integration happened. That constraint turned out to matter more than expected when the race-condition tests were added at the end: because the producer, sysfs reader, and IPC bridge had already been broken into units with explicit interfaces (`std::function` callbacks, injected sleep, injected logger), the stress tests could be wired up without touching any production code. Nothing needed to be refactored to be testable — it already was. That is the practical benefit of TDD for concurrent embedded software: the discipline of writing the test first tends to eliminate shared mutable state and deep call chains by making them painful to test, which in turn reduces cyclomatic complexity almost as a side effect.
|
||||||
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user