Specs2
specs2 is a testing library for Scala that supports both acceptance-style and unit-style specifications. Eric Torreborre created it as a successor to the original specs library, focusing on composability and readable test output. Specifications are written in a behavior-driven development (BDD) style where test descriptions read as natural-language sentences describing expected behavior.
The current release is specs2 5.0. The library provides a rich set of matchers for comparing values, strings, collections, exceptions, and JSON. Data tables allow parameterized tests with multiple input/output combinations in a tabular format. Acceptance specifications separate the description text from the test code, making them suitable for documentation. Unit specifications use a more traditional should/in block structure. specs2 integrates with sbt, ScalaTest, and JUnit runners.
The project website includes a quickstart guide and full API documentation. The source code is on GitHub under the MIT license.
Related technologies
Get an honest assessment
Not sure what you need yet? We'll take an honest look at where you stand and what makes sense as a next step.