avatar

Andres Jaimes

Testing scala classes and controllers

This article discusses different approaches for testing classes, services, and PlayFramework controllers using scalatest.

Setting up the project dependencies

First step is to add to build.sbt the next dependency:

1"org.scalatest" %% …

Akka Actors

The Play Framework is built upon Akka actors, but does everything so that you don’t really need to use them. Despite this, actors are easy to integrate with Play, precisely because it is built on them (there is already an actor system for you …

Make a request to a remote service

This article shows how to make remote requests to services using Scala and the Play-Framework. It documents some recommended features that can improve the reliability of the request.

Setup

Make sure you add the following dependency to build.sbt …

PlayFramework – Java

So far I have really liked this concept. The only con is that some times is difficult to find full examples that use the latest version.

Installing sbt

We need sbt for compiling and running Play applications.

brew install sbt@1

Executing a first …