Quick reference for running the new ECO edge case tests.
# Run all ECO-related tests
cd ~/.openclaw/workspace/zrp
go test -v -run "TestECO" -timeout 30s
# Run specific test files
go test -v handler_eco_edge_test.go handler_eco_test.go types.go validation.go db.go audit.go -timeout 30s
go test -v handler_eco_integrity_test.go handler_eco_test.go types.go validation.go db.go audit.go -timeout 30s
# Run only edge case tests
go test -v -run "TestECO.*edge" -timeout 30s
# Run only integrity tests
go test -v -run "TestECO.*integrity" -timeout 30s
# Run all backend tests
go test ./... -timeout 60s
# Run frontend tests
cd frontend
npx vitest run
# Run specific frontend ECO tests
npx vitest run src/pages/ECOgo test -v -run "TestECOStatusTransitions" -timeout 10sgo test -v -run "TestECOApproval" -timeout 10sgo test -v -run "TestECO_AffectedIPNs" -timeout 10sgo test -v -run "TestECO_SQLInjection" -timeout 10sgo test -v -run "TestECO_DBConstraints|TestECO_ForeignKey" -timeout 10sgo test -v -run "TestECO_.*Title|TestECO_.*Description" -timeout 10sgo test -v -run "TestECO_AuditLog" -timeout 10sAll tests should pass except the 4 documented below.
These tests intentionally fail to document bugs:
-
TestECO_RevisionLetterOverflow
- Documents bug: Revision 'Z' + 1 = '[' instead of 'AA'
- See: ECO_AUDIT_REPORT.md, Bug #1
-
TestECOApproval_ConcurrentApprovals
- Documents bug: Race condition in concurrent approvals
- See: ECO_AUDIT_REPORT.md, Bug #3
- Note: Timing-sensitive, may pass occasionally
-
TestECO_Implementation_AppliesPartChanges
- Integration test requiring parts directory setup
- Not a bug, just needs environment setup
-
TestECOStatusTransitions_InvalidFlow (some subtests)
- Documents bug: Missing state machine validation
- See: ECO_AUDIT_REPORT.md, Bug #2
=== RUN TestECO_AffectedIPNs_JSONFormat
=== RUN TestECO_AffectedIPNs_JSONFormat/Comma_separated
=== RUN TestECO_AffectedIPNs_JSONFormat/JSON_array
--- PASS: TestECO_AffectedIPNs_JSONFormat (0.00s)
--- PASS: TestECO_AffectedIPNs_JSONFormat/Comma_separated (0.00s)
--- PASS: TestECO_AffectedIPNs_JSONFormat/JSON_array (0.00s)
=== RUN TestECO_RevisionLetterOverflow
handler_eco_integrity_test.go:141: Warning: Revision after Z is '[' (ASCII overflow) - should be handled differently
handler_eco_integrity_test.go:144: Revision letter overflowed to '[' - should implement AA, AB, etc. or return error
--- FAIL: TestECO_RevisionLetterOverflow (0.00s)
After running all tests, you should see:
Total ECO Tests: 68
Passed: 64
Failed: 4 (expected)
Pass Rate: 94%
-
Check test isolation
go test -v -run "TestSpecificTest" -count=1
-
Run with race detector
go test -race -v -run "TestECO" -timeout 30s
-
Enable verbose logging
go test -v -run "TestECO" -timeout 30s 2>&1 | tee test.log
-
Run single file
go test -v handler_eco_edge_test.go handler_eco_test.go types.go validation.go db.go audit.go
If tests are failing due to state issues:
# Clear any test databases
rm -f *.db test*.db
# Re-run tests
go test -v -run "TestECO" -timeout 30s- name: Run ECO Tests
run: |
cd ~/.openclaw/workspace/zrp
go test -v -run "TestECO" -timeout 30s -json | tee eco-test-results.json- 64 tests should pass
- 4 tests expected to fail (documented bugs)
- Exit code will be non-zero due to expected failures
- This is normal and expected until bugs are fixed
Once the 3 medium-severity bugs are fixed:
- Update tests to reflect new behavior
- Remove "expected failure" comments
- All 68 tests should pass
- Update this guide to remove expected failures section
See detailed bug descriptions and recommended fixes in:
ECO_AUDIT_REPORT.md- Full audit report with bug detailsECO_POLISH_SUMMARY.md- Task completion summary
Last Updated: 2026-02-21
Test Suite Version: 1.0
Total Tests: 68 (64 passing, 4 expected failures)