Summary

In this chapter, we had an overview of all the testing phases using the bottom-up approach for various kinds and amounts of tested features. We also took the opportunity to review the helpers provided by Play! Framework 2 that enable us to focus on the tests themselves rather than the set up of the application components or tiers.

Since tests are a good starting point to learn Scala and to slightly introduce this language into an existing application, we preferred this language over Java to write our tests. But for those still preferring to stay in the pure Java world, you had enough information about the helpers provided by Play! 2. Furthermore, those helpers and mock-ups can be used along with any other Java testing framework you like.

There are plenty of amazing testing frameworks in Scala, however Play! 2 is particularly well integrated with specs2, so we followed this track too.

Based on this, we separated the tests into three main logical sets, namely atomic, applicative, and workflow. Although each of them have their use cases and their needs in terms of infrastructure or third parties, the helpers of Play! 2 were there to avoid us bothering with such integration.

At the end of this chapter, we're able to test every single part of our application by creating as many specifications our application needs to respect (where a specification explains a certain amount of features).

So it's now time to deploy our application using a continuous integration tool after having asserted that the tests are not dependent on our machine. This is exactly the purpose of the next chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset