Tutorial: jdoc-test
jdoc-test
lets you write real tests directly inside your Javadoc comments. It automatically finds these tests (written in formats like Spock or Gherkin), generates the necessary test files (.groovy
or .feature
), and allows standard tools like JUnit and Gradle to discover and run them just like regular tests. This helps keep your tests close to the code they are testing.
Source Repository: jdoc-test
flowchart TD
A0["Javadoc Test Parser
"]
A1["BDD Spec Generator
"]
A2["JUnit Test Engine
"]
A3["Gradle Build Integration
"]
A0 -- "Provides extracted test code" --> A1
A1 -- "Provides generated tests fo..." --> A2
A2 -- "Uses to find Javadoc tests" --> A0
A3 -- "Invokes parsing task" --> A0
A3 -- "Invokes generation task" --> A1
A3 -- "Configures test execution via" --> A2
Chapters
Generated by AI Codebase Knowledge Builder