Skip to content

Give every test a rationale block - #23

Merged
dirkjink merged 1 commit into
mainfrom
test/rationale-for-every-test
Sep 7, 2026
Merged

Give every test a rationale block#23
dirkjink merged 1 commit into
mainfrom
test/rationale-for-every-test

Conversation

@dirkjink

@dirkjink dirkjink commented Sep 7, 2026

Copy link
Copy Markdown
Member

Summary

  • 133 of the 271 Kotlin tests and the three Java fuzz targets had no three-question rationale block, so the generated test-evidence page listed them undocumented. Every test now opens with What is to be tested? / How will the test case be deemed successful and why? / Why is it important to test this test case?, written against the test body and the production class under test. No test code changed (insert-only diff).
  • generate-test-catalog.py additionally scans src/test/java and strips the Surefire (Type)[n] suffix of parameterized Java methods, so the Jazzer fuzz targets appear with their rationale too. Local run: 269 of 269 tests with a rationale block.
  • CONTRIBUTING states the rule explicitly.

Test plan

  • mvn -o verify (ktlint, full offline suite)
  • Rationale scan: 0 missing across all *Test.kt
  • generate-test-catalog.py on the local Surefire output: 269/269 documented
  • Docs workflow builds the evidence page on CI

🤖 Generated with Claude Code

https://claude.ai/code/session_015GfdGp7eUrjJKBvcJUx3q2

133 of the 271 Kotlin tests and the three Java fuzz targets had no
three-question rationale block, so the generated test-evidence page
listed them without a "what / how / why". Every test now opens with the
block, written against the test body and the production class under
test; no test code changed.

The catalog script additionally scans src/test/java and matches the
Surefire name of a parameterized Java method (`name(Type)[n]`) to its
source, so the fuzz targets are documented on the page as well: the
local run now reports 269 of 269 tests with a rationale block.
CONTRIBUTING states the rule explicitly.

mvn -o verify (ktlint, full offline suite) passes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015GfdGp7eUrjJKBvcJUx3q2
@dirkjink
dirkjink merged commit c14af47 into main Sep 7, 2026
6 checks passed
@dirkjink
dirkjink deleted the test/rationale-for-every-test branch September 7, 2026 20:46
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.

1 participant