-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description
Several test quality issues identified across the test suite:
1. GitHubCliClientTest tests reimplemented logic, not the actual class
The test reimplements JSON parsing locally and tests that copy instead of the real GitHubCliClient. If the production code changes, these tests will not catch regressions.
2. Getter/setter test bloat (~30 tests)
TraceabilityLinkTest, GitHubIssueSyncTest, and RequirementImportTest are 60-70% pure setX(); assertThat(getX()).isEqualTo(...) accessor tests. These provide false confidence and inflate test counts without testing behavior.
3. Reflection-based setId() duplicated across 8+ files
The same 6-line setField(obj, "id", UUID.randomUUID()) helper is copy-pasted across multiple test files. Should be extracted to a shared TestFixtures utility.
4. GroundControlApplicationTest tests nothing
assertThat(GroundControlApplication.class).isNotNull() tests that a class exists at compile time. Zero value.
5. Raw assert in SyncIntegrationTest
Lines 88-92 and 121-123 use Java's assert keyword instead of AssertJ. Can be disabled with JVM flags and provides no failure detail.
6. Brittle migration version assertion
containsExactly("001", ..., "011") breaks with every new migration. Should use hasSizeGreaterThanOrEqualTo.
Recommendation: Delete getter/setter tests, extract shared helpers, fix GitHubCliClientTest to test the real class, replace raw assert with AssertJ.
Traced Requirements
- GC-P002: Append-Only Audit Trail (testing infrastructure supports audit verification)
Impact
Test reliability — false confidence from tests that don't test real behavior.