Exemplar is a new open-source library by Gradle for automated testing of documentation samples. It discovers sample projects or embedded samples in Asciidoctor files, runs them via command-line, and verifies their output matches expected results. Key features include output normalization across environments, JUnit test runner integration, support for multi-step commands via HOCON config files, and SampleModifiers for pre-execution setup. Gradle uses it internally to validate docs and guides. The library is at v0.6 with a stable API, and contributions are welcome for features like Markdown support and additional normalizers.
Table of contents
Table of ContentsIntroductionUse cases for Exemplar #Sample project testing primer #Embedded samples testing primer #Adopt and contribute #DiscussSort: