Skip to content

build(test): a test class that leaves no result fails the build (#51) - #52

Merged
astrapi69 merged 1 commit into
developfrom
build/51-test-results-complete
Oct 31, 2026
Merged

astrapi69 merged 1 commit into
developfrom
build/51-test-results-complete

Conversation

@astrapi69

Copy link
Copy Markdown
Owner

Closes #51

Adds gradle/test-results-complete.gradle, the check of astrapi69/swing-components#34 in its fourth version, and applies it to every test task: a compiled test class that leaves no result fails the build and is named. A test that ends the test JVM (System.exit) can then no longer let the build report green over test classes that never ran.

PropertiesDirectoryWalkerTest goes: its two tests were placeholders, throw new RuntimeException("not yet implemented") under @Test(enabled = false); enabled, both fail with exactly that message. They tested nothing. PropertiesDirectoryWalker has no test after this.

Measured on the default branch with the check applied, ./gradlew test --rerun on an Xvfb of its own: 28 of 29 test classes left a result; PropertiesDirectoryWalkerTest only held two placeholder tests and goes. CI on this pull request is the run on the real build.

gradle/test-results-complete.gradle, the check of astrapi69/swing-components#34 in its fourth version: after
every test task, each compiled test class must have left a result, or the build fails and names it. A
test that ends the test JVM no longer passes as green.

Measured before the change, in a scratch clone: 28 of 29 test classes left a result; PropertiesDirectoryWalkerTest only held two placeholder tests and goes.

Closes #51
@codecov

codecov Bot commented Oct 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.36%. Comparing base (b43db31) to head (b3e2ccc).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop      #52   +/-   ##
==========================================
  Coverage      74.36%   74.36%           
  Complexity       204      204           
==========================================
  Files             25       25           
  Lines            831      831           
  Branches         140      140           
==========================================
  Hits             618      618           
  Misses           134      134           
  Partials          79       79           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@astrapi69
astrapi69 merged commit 869e0db into develop Oct 31, 2026
9 checks passed
@astrapi69
astrapi69 deleted the build/51-test-results-complete branch October 31, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A test class that leaves no result does not fail the build

2 participants