O'Reilly logo

Play Framework Essentials by Julien Richard-Foy

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 2. Persisting Data and Testing

In this chapter, you will see how you can write executable specifications for your web service and how Play can integrate mainstream data persistence technologies like RDMSes or document stores. More precisely, you will see how to perform the following:

  • Write and run unit tests
  • Simulate HTTP requests and inspect returned HTTP responses
  • Persist data using an RDBMS
  • Use an in-memory database for development

Testing your web service

The architecture of your web service is depicted in the following diagram:

Testing your web service

This section presents the testing libraries that are integrated with Play and the testing infrastructure provided ...

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