Package akka.javasdk.testkit
Class TestKitSupport
Object
akka.javasdk.testkit.AsyncCallsSupport
akka.javasdk.testkit.TestKitSupport
This class provided the necessary infrastructure to run integration test for projects built
with the Java SDK. Users should let their test classes extends this class.
This class wires-up a local service using the user's defined components.
Users can interact with their components via their public endpoint via an HTTP client or internally through the {{componentClient}}.
On test teardown, the service and the runtime will be stopped.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected akka.javasdk.client.ComponentClient
protected akka.javasdk.http.HttpClient
A http client for interacting with the service under test, the client will not be authenticated and will appear to the service as a request with the internet principal.protected TestKit
protected akka.javasdk.timer.TimerScheduler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterAll()
void
<T> T
getDependency
(Class<T> clazz) protected TestKit.Settings
Override this to use custom settings for an integration testMethods inherited from class akka.javasdk.testkit.AsyncCallsSupport
await, await, failed
-
Field Details
-
testKit
-
componentClient
protected akka.javasdk.client.ComponentClient componentClient -
timerScheduler
protected akka.javasdk.timer.TimerScheduler timerScheduler -
httpClient
protected akka.javasdk.http.HttpClient httpClientA http client for interacting with the service under test, the client will not be authenticated and will appear to the service as a request with the internet principal.
-
-
Constructor Details
-
TestKitSupport
public TestKitSupport()
-
-
Method Details
-
testKitSettings
Override this to use custom settings for an integration test -
beforeAll
@BeforeAll public void beforeAll() -
afterAll
@AfterAll public void afterAll() -
getDependency
-