public class JUnit4CitrusTestRunner extends JUnit4CitrusTest implements TestRunner, TestSimulator
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
log
Logger
|
citrus| Constructor and Description |
|---|
JUnit4CitrusTestRunner() |
| Modifier and Type | Method and Description |
|---|---|
AntRunAction |
antrun(BuilderSupport<AntRunBuilder> configurer)
Creates and executes a new ANT run action definition
for further configuration.
|
ApplyTestBehaviorAction |
applyBehavior(TestBehavior behavior)
Apply test apply with all test actions, finally actions and test
variables defined in given apply.
|
Template |
applyTemplate(BuilderSupport<TemplateBuilder> configurer)
Adds template container with nested test actions.
|
AssertExceptionBuilder |
assertException()
Assert exception to happen in nested test action.
|
AssertSoapFaultBuilder |
assertSoapFault()
Assert SOAP fault during action execution.
|
AsyncBuilder |
async()
Adds async container with nested test actions.
|
void |
author(String author)
Adds author to the test case.
|
TestAction |
camel(BuilderSupport<CamelRouteActionBuilder> configurer)
Run Camel route actions.
|
CatchExceptionBuilder |
catchException()
Catch exception when thrown in nested test action.
|
ConditionalBuilder |
conditional()
Adds conditional container with nested test actions.
|
<T extends AbstractActionContainer> |
container(T container)
Prepare and add a custom container implementation.
|
protected TestRunner |
createTestRunner(CitrusJUnit4Runner.CitrusFrameworkMethod frameworkMethod,
TestContext context)
Creates new test runner instance for this test method.
|
CreateVariablesAction |
createVariable(String variableName,
String value)
Action creating a new test variable during a test.
|
void |
creationDate(Date date)
Sets the creation date.
|
void |
description(String description)
Adds description to the test case.
|
TestAction |
docker(BuilderSupport<DockerActionBuilder> configurer)
Run docker command action.
|
FinallySequenceBuilder |
doFinally()
Adds sequence of test actions to finally block.
|
EchoAction |
echo(String message)
Creates and executes a new echo action.
|
FailAction |
fail(String message)
Creates a new fail action.
|
TestCase |
getTestCase()
Builds the test case.
|
GroovyAction |
groovy(BuilderSupport<GroovyActionBuilder> configurer)
Creates a new groovy action definition
for further configuration.
|
TestAction |
http(BuilderSupport<HttpActionBuilder> configurer)
Run http command action.
|
InputAction |
input(BuilderSupport<InputActionBuilder> configurer)
Creates a new input action.
|
protected boolean |
isDesignerMethod(Method method)
Searches for method parameter of type test designer.
|
protected boolean |
isRunnerMethod(Method method)
Searches for method parameter of type test runner.
|
IterateBuilder |
iterate()
Run nested test actions in iteration.
|
TestAction |
kubernetes(BuilderSupport<KubernetesActionBuilder> configurer)
Run kubernetes command action.
|
LoadPropertiesAction |
load(String filePath)
Creates a new load properties action.
|
void |
name(String name)
Set custom test case name.
|
void |
packageName(String packageName)
Sets custom package name for this test case.
|
ParallelBuilder |
parallel()
Run nested test actions in parallel to each other using multiple threads.
|
ExecutePLSQLAction |
plsql(BuilderSupport<ExecutePLSQLBuilder> configurer)
Creates a new executePLSQL action definition
for further configuration.
|
PurgeMessageChannelAction |
purgeChannels(BuilderSupport<PurgeChannelsBuilder> configurer)
Creates a new purge message channel action definition
for further configuration.
|
PurgeEndpointAction |
purgeEndpoints(BuilderSupport<PurgeEndpointsBuilder> configurer)
Creates a new purge message endpoint action definition
for further configuration.
|
TestAction |
purgeQueues(BuilderSupport<PurgeJmsQueuesBuilder> configurer)
Creates a new purge jms queues action definition
for further configuration.
|
ExecuteSQLQueryAction |
query(BuilderSupport<ExecuteSQLQueryBuilder> configurer)
Creates a new executesqlquery action definition
for further configuration.
|
ReceiveMessageAction |
receive(BuilderSupport<ReceiveMessageBuilder> configurer)
Creates receive message action definition with message endpoint instance.
|
ReceiveTimeoutAction |
receiveTimeout(BuilderSupport<ReceiveTimeoutBuilder> configurer)
Creates a new receive timeout action definition
for further configuration.
|
RepeatBuilder |
repeat()
Adds repeat until true container with nested test actions.
|
RepeatOnErrorBuilder |
repeatOnError()
Adds repeat on error until true container with nested test actions.
|
<T extends TestAction> |
run(T testAction)
Runs test action and returns same action after execution.
|
TestAction |
selenium(BuilderSupport<SeleniumActionBuilder> configurer)
Run selenium command action.
|
SendMessageAction |
send(BuilderSupport<SendMessageBuilder> configurer)
Create send message action definition with message endpoint instance.
|
SequenceBuilder |
sequential()
Run nested test actions in sequence.
|
void |
simulate(Method method,
TestContext context,
org.springframework.context.ApplicationContext applicationContext)
Simulates test method execution.
|
SleepAction |
sleep()
Add sleep action with default delay time.
|
SleepAction |
sleep(long milliseconds)
Add sleep action with time in milliseconds.
|
TestAction |
soap(BuilderSupport<SoapActionBuilder> configurer)
Run soap command action.
|
ExecuteSQLAction |
sql(BuilderSupport<ExecuteSQLBuilder> configurer)
Creates a new executeSQL action definition
for further configuration.
|
void |
start()
Starts the test case execution.
|
StartServerAction |
start(Server... servers)
Creates a new start server action definition
for further configuration.
|
StartServerAction |
start(Server server)
Creates a new start server action definition
for further configuration.
|
void |
status(TestCaseMetaInfo.Status status)
Sets test case status.
|
void |
stop()
Stops test case execution.
|
StopServerAction |
stop(Server... servers)
Creates a new stop server action definition
for further configuration.
|
StopServerAction |
stop(Server server)
Creates a new stop server action definition
for further configuration.
|
StopTimeAction |
stopTime()
Creates a new stop time action.
|
StopTimeAction |
stopTime(String id)
Creates a new stop time action.
|
StopTimeAction |
stopTime(String id,
String suffix)
Creates a new stop time action.
|
StopTimerAction |
stopTimer(String timerId)
Stops timer matching the supplied timerId
|
StopTimerAction |
stopTimers()
Stops all timers
|
void |
testClass(Class<?> type)
Set test class.
|
TimerBuilder |
timer()
Repeat nested test actions based on a timer interval.
|
TraceVariablesAction |
traceVariables()
Creates a new trace variables action definition
that prints variable values to the console/logger.
|
TraceVariablesAction |
traceVariables(String... variables)
Creates a new trace variables action definition
that prints variable values to the console/logger.
|
TransformAction |
transform(BuilderSupport<TransformActionBuilder> configurer)
Creates a new transform action definition
for further configuration.
|
<T> T |
variable(String name,
T value)
Adds a new variable definition to the set of test variables
for this test case and return its value.
|
WaitBuilder |
waitFor()
Creates a wait action that waits for a condition to be satisfied before continuing.
|
Wait |
waitFor(BuilderSupport<WaitBuilder> configurer)
Deprecated.
|
TestAction |
zookeeper(BuilderSupport<ZooActionBuilder> configurer)
Run zookeeper command action.
|
createTestDesigner, invokeTestMethod, resolveAnnotatedResource, runcreateTestLoader, executeTest, prepareTestContext, resolveParametersetApplicationContextpublic void simulate(Method method, TestContext context, org.springframework.context.ApplicationContext applicationContext)
TestSimulatorsimulate in interface TestSimulatorprotected TestRunner createTestRunner(CitrusJUnit4Runner.CitrusFrameworkMethod frameworkMethod, TestContext context)
JUnit4CitrusTestcreateTestRunner in class JUnit4CitrusTestprotected final boolean isDesignerMethod(Method method)
JUnit4CitrusTestisDesignerMethod in class JUnit4CitrusTestprotected final boolean isRunnerMethod(Method method)
JUnit4CitrusTestisRunnerMethod in class JUnit4CitrusTestpublic TestCase getTestCase()
TestRunnergetTestCase in interface TestRunnergetTestCase in interface TestSimulatorgetTestCase in class AbstractJUnit4CitrusTestpublic void testClass(Class<?> type)
TestRunnertestClass in interface TestRunnerpublic void name(String name)
TestRunnername in interface TestRunnerpublic void description(String description)
TestRunnerdescription in interface TestRunnerpublic void author(String author)
TestRunnerauthor in interface TestRunnerpublic void packageName(String packageName)
TestRunnerpackageName in interface TestRunnerpublic void status(TestCaseMetaInfo.Status status)
TestRunnerstatus in interface TestRunnerpublic void creationDate(Date date)
TestRunnercreationDate in interface TestRunnerpublic void start()
TestRunnerstart in interface TestRunnerpublic void stop()
TestRunnerstop in interface TestRunnerpublic <T> T variable(String name, T value)
TestRunnervariable in interface TestRunnerpublic <T extends TestAction> T run(T testAction)
TestRunnerrun in interface TestRunnerpublic ApplyTestBehaviorAction applyBehavior(TestBehavior behavior)
TestRunnerapplyBehavior in interface TestRunnerpublic <T extends AbstractActionContainer> AbstractTestContainerBuilder<T> container(T container)
TestRunnercontainer in interface TestRunnerpublic CreateVariablesAction createVariable(String variableName, String value)
TestRunnercreateVariable in interface TestRunnerpublic AntRunAction antrun(BuilderSupport<AntRunBuilder> configurer)
TestRunnerantrun in interface TestRunnerpublic EchoAction echo(String message)
TestRunnerecho in interface TestRunnerpublic ExecutePLSQLAction plsql(BuilderSupport<ExecutePLSQLBuilder> configurer)
TestRunnerplsql in interface TestRunnerpublic ExecuteSQLAction sql(BuilderSupport<ExecuteSQLBuilder> configurer)
TestRunnersql in interface TestRunnerpublic ExecuteSQLQueryAction query(BuilderSupport<ExecuteSQLQueryBuilder> configurer)
TestRunnerquery in interface TestRunnerpublic ReceiveTimeoutAction receiveTimeout(BuilderSupport<ReceiveTimeoutBuilder> configurer)
TestRunnerreceiveTimeout in interface TestRunnerpublic FailAction fail(String message)
TestRunnerfail in interface TestRunnerpublic InputAction input(BuilderSupport<InputActionBuilder> configurer)
TestRunnerinput in interface TestRunnerpublic LoadPropertiesAction load(String filePath)
TestRunnerload in interface TestRunnerfilePath - path to properties file.public TestAction purgeQueues(BuilderSupport<PurgeJmsQueuesBuilder> configurer)
TestRunnerpurgeQueues in interface TestRunnerpublic PurgeMessageChannelAction purgeChannels(BuilderSupport<PurgeChannelsBuilder> configurer)
TestRunnerpurgeChannels in interface TestRunnerpublic PurgeEndpointAction purgeEndpoints(BuilderSupport<PurgeEndpointsBuilder> configurer)
TestRunnerpurgeEndpoints in interface TestRunnerpublic ReceiveMessageAction receive(BuilderSupport<ReceiveMessageBuilder> configurer)
TestRunnerreceive in interface TestRunnerpublic SendMessageAction send(BuilderSupport<SendMessageBuilder> configurer)
TestRunnersend in interface TestRunnerpublic SleepAction sleep()
TestRunnersleep in interface TestRunnerpublic SleepAction sleep(long milliseconds)
TestRunnersleep in interface TestRunner@Deprecated public Wait waitFor(BuilderSupport<WaitBuilder> configurer)
TestRunnerwaitFor in interface TestRunnerpublic WaitBuilder waitFor()
TestRunnerwaitFor in interface TestRunnerpublic StartServerAction start(Server... servers)
TestRunnerstart in interface TestRunnerpublic StartServerAction start(Server server)
TestRunnerstart in interface TestRunnerpublic StopServerAction stop(Server... servers)
TestRunnerstop in interface TestRunnerpublic StopServerAction stop(Server server)
TestRunnerstop in interface TestRunnerpublic StopTimeAction stopTime()
TestRunnerstopTime in interface TestRunnerpublic StopTimeAction stopTime(String id)
TestRunnerstopTime in interface TestRunnerpublic StopTimeAction stopTime(String id, String suffix)
TestRunnerstopTime in interface TestRunnerpublic TraceVariablesAction traceVariables()
TestRunnertraceVariables in interface TestRunnerpublic TraceVariablesAction traceVariables(String... variables)
TestRunnertraceVariables in interface TestRunnerpublic GroovyAction groovy(BuilderSupport<GroovyActionBuilder> configurer)
TestRunnergroovy in interface TestRunnerpublic TransformAction transform(BuilderSupport<TransformActionBuilder> configurer)
TestRunnertransform in interface TestRunnerpublic AssertExceptionBuilder assertException()
TestRunnerassertException in interface TestRunnerpublic CatchExceptionBuilder catchException()
TestRunnercatchException in interface TestRunnerpublic AssertSoapFaultBuilder assertSoapFault()
TestRunnerassertSoapFault in interface TestRunnerpublic ConditionalBuilder conditional()
TestRunnerconditional in interface TestRunnerpublic IterateBuilder iterate()
TestRunneriterate in interface TestRunnerpublic ParallelBuilder parallel()
TestRunnerparallel in interface TestRunnerpublic RepeatOnErrorBuilder repeatOnError()
TestRunnerrepeatOnError in interface TestRunnerpublic RepeatBuilder repeat()
TestRunnerrepeat in interface TestRunnerpublic SequenceBuilder sequential()
TestRunnersequential in interface TestRunnerpublic AsyncBuilder async()
TestRunnerasync in interface TestRunnerpublic TimerBuilder timer()
TestRunnertimer in interface TestRunnerpublic StopTimerAction stopTimer(String timerId)
TestRunnerstopTimer in interface TestRunnerpublic StopTimerAction stopTimers()
TestRunnerstopTimers in interface TestRunnerpublic TestAction docker(BuilderSupport<DockerActionBuilder> configurer)
TestRunnerdocker in interface TestRunnerpublic TestAction kubernetes(BuilderSupport<KubernetesActionBuilder> configurer)
TestRunnerkubernetes in interface TestRunnerpublic TestAction selenium(BuilderSupport<SeleniumActionBuilder> configurer)
TestRunnerselenium in interface TestRunnerpublic TestAction http(BuilderSupport<HttpActionBuilder> configurer)
TestRunnerhttp in interface TestRunnerpublic TestAction soap(BuilderSupport<SoapActionBuilder> configurer)
TestRunnersoap in interface TestRunnerpublic TestAction camel(BuilderSupport<CamelRouteActionBuilder> configurer)
TestRunnercamel in interface TestRunnerpublic TestAction zookeeper(BuilderSupport<ZooActionBuilder> configurer)
TestRunnerzookeeper in interface TestRunnerpublic Template applyTemplate(BuilderSupport<TemplateBuilder> configurer)
TestRunnerapplyTemplate in interface TestRunnerpublic FinallySequenceBuilder doFinally()
TestRunnerdoFinally in interface TestRunnerCopyright © 2008–2019 ConSol Software GmbH. All rights reserved.