As I’ve written before, when I finished writing the Scala Cookbook it ended up being about 140 pages longer than my editor wanted, and I had to cut some content from the book. Unfortunately the chapter on “Logging & Testing” was one of the victims of the cut, but I’m glad to say that I’ve taken the time to convert that material to HTML. As a result, here are links to the 12 ScalaTest tutorials in that chapter:
- ScalaTest 101 - Installing ScalaTest
- ScalaTest 102 - Writing TDD style unit tests with ScalaTest
- ScalaTest 103 - Writing a first BDD test with ScalaTest
- ScalaTest 104 - Adding Given/When/Then behavior to ScalaTest BDD tests
- ScalaTest 105 - Adding more tests and a test suite
- ScalaTest 106 - Printing expected and actual values when a test fails
- ScalaTest 107 - Marking a test as ’pending’
- ScalaTest 108 - Testing expected exceptions with intercept
- ScalaTest 109 - Mark your tests with tags to include or exclude them
- ScalaTest 110 - Temporarily disabling unit tests
- ScalaTest 111 - How to use Mock objects with ScalaTest
- ScalaTest 112: How to run ScalaTest unit tests in Eclipse
As mentioned, these tips and tutorials come from the Scala Cookbook.
If you like these simple tips, I think you’ll like the book, which covers Scala collections, actors, concurrency, functional programming, traits, SBT, idioms, and much more.