What are TestKit, TestActorRef and TestProbe in Akka?

kind of new actor akki

but you will like the uses and differences between TestKit, TastActorRef and TestProbe

which is used when testing the akka module.

I saw how they were used for akka unit testing systems, but don't seem to understand the concept

tried searching on the internet, but the documentation seems to be sparse.

Any brief explanation is appreciated.

thanks ll.

+6
source share
2 answers

Your search skills require some honing, I think:

http://doc.akka.io/docs/akka/snapshot/scala/testing.html

http://doc.akka.io/docs/akka/snapshot/java/testing.html

In short:

  • TestKit can be used as the base class for your tests, it provides an internal actor that can receive answers and many approval methods for these answers.

  • TestProbe is a complete TestKit that you can enter in message flows

These two questions related to integration testing, the following for unit testing:

  • TestActorRef allows you to look inside the actor and run his code synchronously, JUnit style.
+7
source

I found the following two links very useful (along with the official Akka docs) when I tried to handle Akka testing in Java:

+1
source

All Articles