ScalaTest User Guide
Selecting testing styles
Defining base classes
Writing your first test
Tagging your tests
Running your tests
Testing with mock objects
Philosophy and design
Migrating to 3.0
This user guide will help you get rolling quickly with ScalaTest. First a brief orientation:
To include ScalaTest in your sbt project, simply add this line:
libraryDependencies += "org.scalatest" % "scalatest_2.12" % "3.0.4" % "test"
To include ScalaTest in your Maven project, use:
<dependency> <groupId>org.scalatest</groupId> <artifactId>scalatest_2.11</artifactId> <version>3.0.4</version> <scope>test</scope> </dependency>
For other ways to include ScalaTest in your project, see Running your tests.
Using ScalaTest on your project is as easy as 1, 2, 3: