O'Reilly logo

Scala Test-Driven Development by Gaurav Sood

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Running Specs2 tests

SBT recognizes Specs2 as a test framework; therefore, it is the most common way to run Specs2 tests. The fact that SBT considers Specs2 a test framework enables SBT to execute any class or object that is extending the Specification abstract class. The test target of SBT will execute any specification within the src/test/scala directory:

sbt> test

You can also run individual tests using the test-only target:

sbt> test-only org.packt. EmployeeAgeDataTableSpecification

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required