-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
P3-lowLow priorityLow priorityarea/ci-cdCI/CD workflow generationCI/CD workflow generationneeds-investigationreleasedtestingTest coverage and qualityTest coverage and qualitytriaged
Description
Context
PR #29 added test_command_test.dart with 3 tests covering:
- No test/ directory → skip
- Log directory resolution
- Full passing test flow → results.json + summary
And cli_utils_test.dart with comprehensive coverage of:
resolveTestLogDir(6 tests)- Filesystem safety (5 tests)
parseTestResultsJson(8 tests including edge cases)writeTestJobSummary(7 tests including escaping, truncation, backticks)StepSummary.writebyte guard +collapsiblecontent escaping
Gaps to fill
TestCommand paths not yet tested:
- Process timeout →
_killAndAwaitExitinvoked (difficult: requires slow child process) - Failing root tests → exit code propagation + failure summary
- Sub-package with missing pubspec → failure recorded
- Sub-package pub get timeout →
_runPubGetWithTimeoutreturns null - Sub-package test failure → accumulated in
failureslist - Multiple sub-packages with mixed pass/fail → correct summary
Design constraint: TestCommand spawns real dart test processes, making pure unit tests difficult. Options:
- Extract orchestration into testable function with injectable process spawner
- Integration tests with synthetic Dart packages (current approach for the 3 existing tests)
- Accept current coverage as sufficient for CI-only code
Priority
P3 — the existing tests cover the critical paths (parsing, summary generation, log dir resolution). The untested paths are process management edge cases that are hard to trigger reliably in tests.
Identified during PR #29 review.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3-lowLow priorityLow priorityarea/ci-cdCI/CD workflow generationCI/CD workflow generationneeds-investigationreleasedtestingTest coverage and qualityTest coverage and qualitytriaged