public class JkDockerAppTester extends JkApplicationTester
reAttemptDelay, startTimeout
Modifier and Type | Method and Description |
---|---|
protected void |
executeTests()
Executes the tests for the application under test.
|
<T extends JkDockerBuild> |
getDockerBuild() |
protected void |
init()
Prepares the variables required to start and stop the application,
including the base URL and port configuration.
|
protected boolean |
isApplicationReady()
Check and returns if the application is ready to be tested.
|
static JkDockerAppTester |
of(JkDockerBuild dockerBuild,
java.util.function.Consumer<java.lang.String> tester) |
JkDockerAppTester |
setBaseUrl(java.lang.String baseUrl)
Sets the base URL for the application.
|
JkDockerAppTester |
setContextPath(java.nio.file.Path contextPath) |
JkDockerAppTester |
setImageName(java.lang.String imageName) |
JkDockerAppTester |
setPort(int port)
Sets the port for the application to use.
|
JkDockerAppTester |
setShowAppLogs(boolean showAppLogs)
Configures whether application logs should be displayed during the testing process.
|
protected void |
startApp()
Starts the application and its environment.
|
protected void |
stopForcefully()
This method is invoked when, the application did not start until defined timeout.
|
protected void |
stopGracefully()
This method is invoked when tests are terminated, to undeploy the application and its environment.
|
findFreePort, run
public static JkDockerAppTester of(JkDockerBuild dockerBuild, java.util.function.Consumer<java.lang.String> tester)
protected void init()
JkApplicationTester
init
in class JkApplicationTester
protected void startApp()
JkApplicationTester
startApp
in class JkApplicationTester
protected boolean isApplicationReady()
JkApplicationTester
isApplicationReady
in class JkApplicationTester
protected void executeTests()
JkApplicationTester
for instance
if
tests failed.executeTests
in class JkApplicationTester
protected void stopGracefully()
JkApplicationTester
stopGracefully
in class JkApplicationTester
protected void stopForcefully()
JkApplicationTester
stopForcefully
in class JkApplicationTester
public JkDockerAppTester setPort(int port)
public JkDockerAppTester setBaseUrl(java.lang.String baseUrl)
public JkDockerAppTester setShowAppLogs(boolean showAppLogs)
public JkDockerAppTester setContextPath(java.nio.file.Path contextPath)
public JkDockerAppTester setImageName(java.lang.String imageName)
public <T extends JkDockerBuild> T getDockerBuild()