Testing Actors
Demo
Covers :
- Using TestKit and Implicit Sender
- Single Thread Testing with TestActorRef
- testing state
- testing messaging with ask pattern
- MultiThread testing with TestProbe
Matchers :
- expectMsgPF
- receiveWhile
- receiveN
- expectNoMsg
System Under Test (SUT)
- explain role of inheritance in ADT messages
- explain role of AnyVal
Exercises
SINGLE THREAD TEST: https://github.com/PawelWlodarski/workshops-reactive/blob/master/src/test/scala/jug/workshops/reactive/testing/SynchronousTestingExercise.scala
MULTI THREAD TEST : https://github.com/PawelWlodarski/workshops-reactive/blob/master/src/test/scala/jug/workshops/reactive/testing/AsynchronousTestingExercise.scala
More
- ScaledTimeSpans
TODO
- not unique "browser"
- actor setup/teardown in fixture
- fix "BotFound" -> "Error"
- explain testFixture
- answer to End2End