O'Reilly logo

Scala in Action by Nilanjan Raychaudhuri

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

Chapter 10. Building confidence with testing

This chapter covers

  • Automated testing using ScalaCheck
  • Using JUnit to test Scala code
  • Writing better tests with dependency injection
  • Behavior-driven development using Specs
  • Testing actor-based systems

So far, I’ve been showing you code without writing tests—so why worry about that right now? The answer is, I wrote tests around the code but didn’t mention doing so because I wanted you to focus more on the Scala language. Now that’s going to change. My goal for this chapter is to make you comfortable writing automated tests in Scala so that you can build production-quality software.

The path to writing well-crafted code[1] is the path where you write tests for your code. The common perception ...

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