Using ScalaTest to test akka actors

akka, automated-tests, scala, scalatest

Solution

Akka is very well documented. You can find the documentation here. Here is the link to the Testing Actor Systems (Scala) chapter, which comes with an example.

Note: The full example uses a ScalaTest WordSpec. For a FunSuite example, change WordSpec to FunSuite and write tests with test("test name") rather than WordSpec's should/in style. All else will be identical to the example shown.

Problem

I am struggling to find any ScalaTest samples written using FunSuite testing an akka actor. I appreciate if somebody could provide a simple scalatest example testing a simple akka actor.

Original source