specs2 is a library for writing executable software specifications in Scala.

It is a complete rewrite of the specs project with the aim of:

  • providing both acceptance specifications (like Fitnesse) and unit specifications (as in specs)
  • being more robust
  • being faster

The features of specs2 are:

  • Forms for writing Fitnesse-like specifications (with Markdown markup)
  • Html reporting to create documentation for acceptance tests, to create a User Guide,...
  • Integration with sbt and JUnit tools (maven, IDEs)
  • Concurrent execution of examples by default
  • ScalaCheck properties
  • Mocks with Mockito
  • Data tables
  • AutoExamples, where the source code is extracted to describe the example
  • A rich library of matchers
    • Easy to create and compose
    • Usable with must and should
    • Returning "functional" results or throwing exceptions
    • Reusable outside of specs2 (in JUnit tests for example)

specs2 has not been fully battled-tested yet so please use the issues page and the users mailing-list for bugs, feedback, comments, ideas, etc,...

There is also an in-progress project to use specs2 for specifying a Lift webapp:

Have fun with specs2!