Build Status

sbt-example is an sbt plug-in for creating unit tests from examples in Scaladoc.

  • Documentation - sbt-example eats its own dog food. The tests of sbt-example is generated by sbt-example itself from Scaladoc, which is also the documentation for using sbt-example.

The previous version of this project is the macro annotation @example, which is deprecated and does not support Scala 2.12.5+ version.


  • AsynchronousPool - an asynchronous resource pool, whose Scaladoc contains tests written in ScalaTest and ScalaMock
  • Factory - a dependent-type type class for dependency injection, whose Scaladoc contains a huge number of small usecases.
  • PartialApply - a dependent-type type class for partial applying a function, whose Scaladoc is written in Given-When-Then style.

(Feel free to add your Scaladoc here)


  • Sbt 1.x