Here, we will see some simple techniques for testing Scala methods. For Scala users, this is the most familiar unit testing framework (you can also use it for testing Java code and soon for JavaScript). ScalaTest supports a number of different testing styles, each designed to support a specific type of testing need. For details, see ScalaTest User Guide at http://www.scalatest.org/user_guide/selecting_a_style. Although ScalaTest supports many styles, one of the quickest ways to get started is to use the following ScalaTest traits and write the tests in the TDD (test-driven development) style:
- FunSuite
- Assertions
- BeforeAndAfter
Feel free to browse the preceding URLs to learn more about these traits; that will make rest ...