liveBook · Manning

Synchronous testing

As explained in Akka in Action, Second Edition

Synchronous actor testing is a sequential technique for testing an actor in isolation in a controlled environment without exercising asynchronous interactions.

Synchronous testing checks an actor in isolation through sequential execution and deterministic effects. It uses a controlled environment rather than exercising asynchronous interactions among real actors. section 4.0 section 4.2

Use synchronous testing to inspect:

This is a white-box technique for internal actor logic, not a substitute for integration testing. It cannot test asynchronous calls, interaction with real actor implementations, timers, or the scheduler. section 4.2 section 4.1

How Akka in Action, Second Edition covers it

How deep it goes
Explains white-box checks of effects, received messages, and logs, while stopping short of asynchronous, timer, scheduler, and real-actor interactions.
Examples
Uses BehaviorTestKit for execution effects and TestInbox for probing messages sent to an ActorRef.
What it assumes
Assumes actor messaging and ActorRef access while treating internal state as observable only through messages and resulting effects.
What you can do after
Apply it via BehaviorTestKit and TestInbox to assert actor effects, message reception, and logs sequentially.
How it connects
Connects actor isolation with BehaviorTestKit, TestInbox, ActorRef, asynchronous testing, and integration testing.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Akka in Action, Second Edition. The section links point to the parts of the book it draws on.