Summary

In this chapter, we saw how a Play application can be tested using Specs2 or ScalaTest. We have also come across the different helper methods available to simplify testing a Play application. In the unit testing section, we discussed the different approaches that can be taken while designing models and controller based on the preferred testing process using traits with defined methods or dependency injection. We also discussed the functional testing of a Play application within the context of an application with a test server and within a browser using Selenium WebDrivers.

In the next chapter, we will discuss debugging and logging in to your Play application.

Get Mastering Play Framework for Scala now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.