Synchronous testing
Synchronous testing is a technique that tests behavior in a controlled, sequential execution context without exercising asynchronous interactions.
Effective Behavior-Driven Development
A testing pattern that runs an asynchronous operation synchronously when asynchrony is not the behavior under test.
- How it is used
- Simplifies tests that depend on asynchronous resources when completion timing is not itself under test.
- How deep it goes
- Defines the pattern, gives a stubbed time-service example, and warns that synchronous execution can hide concurrency defects.
- Examples
- Uses a background job and a stub time service that fires events immediately.
- What you can do after
- Apply it by running normally asynchronous work synchronously when timing is incidental, while assessing risks from the changed execution mode.
Read how Effective Behavior-Driven Development explains synchronous testing →
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.
- How it is used
- Tests an actor's internal logic in isolation when sequential, deterministic execution is sufficient.
- 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 you can do after
- Apply it via BehaviorTestKit and TestInbox to assert actor effects, message reception, and logs sequentially.
Read how Akka in Action, Second Edition explains synchronous testing →
What to know first
- asynchronous programmingAsynchronous programming structures operations so that the initiating execution can continue or yield control without synchronously waiting for each operation to complete.
Related concepts
- asynchronous programmingcontrasts with · Asynchronous programming structures operations so that the initiating execution can continue or yield control without synchronously waiting for each operation to complete.
- schedulercontrasts with · A scheduler is a software component that selects, orders, or dispatches tasks for execution and may assign them execution resources according to defined policies or constraints.
- timercontrasts with · A timer is a mechanism that tracks or schedules time to trigger an event or action after a specified duration or at recurring intervals.
- actoruses · An actor is a person, system, process, or computational entity that performs actions or participates in interactions within a system.
Questions about synchronous testing
What is synchronous testing?
Synchronous testing is a technique that tests behavior in a controlled, sequential execution context without exercising asynchronous interactions.
Which Manning books explain synchronous testing?
Effective Behavior-Driven Development and Akka in Action, Second Edition.
What should I know before learning synchronous testing?
Manning books that teach synchronous testing usually introduce asynchronous programming first.
What is the difference between synchronous testing and asynchronous programming?
Synchronous testing is a technique that tests behavior in a controlled, sequential execution context without exercising asynchronous interactions. Asynchronous programming structures operations so that the initiating execution can continue or yield control without synchronously waiting for each operation to complete.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

