package testkit
- Alphabetic
- Public
- All
Type Members
-
class
PersistentEntityTestDriver[C, E, S] extends AnyRef
A testing utility for verifying that a com.lightbend.lagom.scaladsl.persistence.PersistentEntity emits expected events and side-effects in response to incoming commands.
A testing utility for verifying that a com.lightbend.lagom.scaladsl.persistence.PersistentEntity emits expected events and side-effects in response to incoming commands.
It also verifies that all commands, events, replies and state are serializable, and reports any such problems in the
issues
of theOutcome
. -
final
class
ProducerStub[T] extends AnyRef
Stubs the production end of a com.lightbend.lagom.scaladsl.api.broker.Topic so that test writers can mock message production from upstream services into topics consumed by services under test.
-
final
class
ProducerStubFactory extends AnyRef
Factors com.lightbend.lagom.scaladsl.testkit.ProducerStub's.
- class ReadSideTestDriver extends ReadSide
- trait TestTopicComponents extends TopicFactoryProvider
Value Members
- object PersistentEntityTestDriver
-
object
ServiceTest
Support for writing functional tests for one service.
Support for writing functional tests for one service. The service is running in a server and in the test you can interact with it using its service client, i.e. calls to the service API.
The server is ran standalone without persistence, pubsub or cluster features enabled. Cassandra is also disabled by default. If your service require either of these features you can enable them in the
Setup
.There are two different styles that can be used. It is most convenient to use ServiceTest.withServer(), since it automatically starts and stops the server before and after the given block. When your test have several test methods, and especially when using persistence, it is faster to only ServiceTest.startServer() the server once in a before all tests hook, and then stop it in an after all test hook.