|
|
|
@@ -26,6 +26,27 @@ |
|
|
|
- [ ] Failure modes are covered. |
|
|
|
- [ ] Postconditions are observable. |
|
|
|
|
|
|
|
## Example |
|
|
|
|
|
|
|
Feature: Export a territory |
|
|
|
|
|
|
|
Contract under test: |
|
|
|
|
|
|
|
- Preconditions: The territory exists and the user is authorized. |
|
|
|
- Inputs: Territory ID. |
|
|
|
- Outputs: A downloadable ZIP file. |
|
|
|
- Postconditions: The ZIP contains the generated XLSX and PDFs. |
|
|
|
- Invariants: The exported files are named consistently. |
|
|
|
- Failure modes: Missing territory, file write failure, or export timeout. |
|
|
|
- Side effects: Temporary export files may be created and cleaned up after download. |
|
|
|
|
|
|
|
Test focus: |
|
|
|
|
|
|
|
- Verify the export is rejected when the territory is missing. |
|
|
|
- Verify the ZIP contains both the spreadsheet and the PDFs. |
|
|
|
- Verify failed file writes are reported as errors. |
|
|
|
- Verify cleanup happens after download. |
|
|
|
|
|
|
|
--- |
|
|
|
|
|
|
|
## Self-Evolution Protocol |
|
|
|
|