public class TestNGCitrusTestDesigner extends TestNGCitrusTest implements TestDesigner, TestSimulator
AbstractTestNGCitrusTest.FakeExecutionCallBack
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
log
Logger
|
citrus
Constructor and Description |
---|
TestNGCitrusTestDesigner() |
Modifier and Type | Method and Description |
---|---|
void |
action(TestAction testAction)
Adds a custom test action implementation.
|
AntRunBuilder |
antrun(String buildFilePath)
Creates 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.
|
TemplateBuilder |
applyTemplate(String name)
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.
|
void |
author(String author)
Adds author to the test case.
|
CamelRouteActionBuilder |
camel()
Creates a new Camel route action.
|
CatchExceptionBuilder |
catchException()
Action catches possible exceptions in nested test actions.
|
ConditionalBuilder |
conditional()
Adds conditional container with nested test actions.
|
protected void |
configure()
Main entrance method for builder pattern usage.
|
<T extends AbstractActionContainer> |
container(T container)
Prepare and add a custom container implementation.
|
protected TestDesigner |
createTestDesigner(Method method,
TestContext context)
Creates new test designer 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.
|
DockerActionBuilder |
docker()
Creates a new docker execute action.
|
FinallySequenceBuilder |
doFinally()
Adds sequence of test actions to finally block.
|
EchoAction |
echo(String message)
Creates a new echo action.
|
protected void |
executeTest() |
FailAction |
fail(String message)
Creates a new fail action.
|
TestCase |
getTestCase()
Builds the test case.
|
protected Map<String,Object> |
getVariables()
Get the test variables.
|
GroovyActionBuilder |
groovy(org.springframework.core.io.Resource scriptResource)
Creates a new groovy action definition with
script file resource.
|
GroovyActionBuilder |
groovy(String script)
Creates a new groovy action definition with
script code.
|
HttpActionBuilder |
http() |
InputActionBuilder |
input()
Creates a new input action.
|
protected void |
invokeTestMethod(org.testng.ITestResult testResult,
Method method,
TestCase testCase,
TestContext context,
int invocationCount)
Invokes test method based on designer or runner environment.
|
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()
Adds iterate container with nested test actions.
|
JavaActionBuilder |
java(Class<?> clazz)
Creates a new Java action definition from Java class.
|
JavaActionBuilder |
java(Object instance)
Creates a new Java action definition from Java object instance.
|
JavaActionBuilder |
java(String className)
Creates a new Java action definition from class name.
|
KubernetesActionBuilder |
kubernetes()
Creates a new kubernetes execute 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()
Adds parallel container with nested test actions.
|
ExecutePLSQLBuilder |
plsql(DataSource dataSource)
Creates a new executePLSQL action definition
for further configuration.
|
PurgeChannelsBuilder |
purgeChannels()
Creates a new purge message channel action definition
for further configuration.
|
PurgeEndpointsBuilder |
purgeEndpoints()
Purge endpoints.
|
PurgeJmsQueuesBuilder |
purgeQueues()
Purge queues using default connection factory.
|
ExecuteSQLQueryBuilder |
query(DataSource dataSource)
Creates a new executesqlquery action definition
for further configuration.
|
ReceiveMessageBuilder |
receive(Endpoint messageEndpoint)
Creates receive message action definition with message endpoint instance.
|
ReceiveMessageBuilder |
receive(String messageEndpointName)
Creates receive message action definition with messsage endpoint name.
|
ReceiveTimeoutBuilder |
receiveTimeout(Endpoint messageEndpoint)
Creates a new receive timeout action definition
for further configuration.
|
ReceiveTimeoutBuilder |
receiveTimeout(String messageEndpointName)
Creates a new receive timeout action definition from message endpoint name as String.
|
RepeatBuilder |
repeat()
Adds repeat until true container with nested test actions.
|
RepeatOnErrorBuilder |
repeatOnError()
Adds repeat on error until true container with nested test actions.
|
SeleniumActionBuilder |
selenium()
Creates a new selenium action builder.
|
SendMessageBuilder |
send(Endpoint messageEndpoint)
Create send message action definition with message endpoint instance.
|
SendMessageBuilder |
send(String messageEndpointName)
Create send message action definition with message endpoint name.
|
SequenceBuilder |
sequential()
Adds sequential container with nested test actions.
|
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(double seconds)
Add sleep action with time in seconds.
|
SleepAction |
sleep(long milliseconds)
Add sleep action with time in milliseconds.
|
SoapActionBuilder |
soap() |
ExecuteSQLBuilder |
sql(DataSource dataSource)
Creates a new executeSQL action definition
for further configuration.
|
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.
|
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 the timer matching the supplied timerId
|
StopTimerAction |
stopTimers()
Stops all timers within the current test context
|
void |
testClass(Class<?> type)
Set test class.
|
TimerBuilder |
timer()
Adds a timer container.
|
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.
|
TransformActionBuilder |
transform()
Creates a new transform action definition
for further configuration.
|
void |
variable(String name,
Object value)
Adds a new variable definition to the set of test variables
for this test case.
|
WaitActionBuilder |
waitFor()
Add wait action.
|
ZooActionBuilder |
zookeeper()
Creates a new zookeeper execute action.
|
createTestRunner, resolveAnnotatedResource, run, run
afterSuite, beforeSuite, createTestLoader, getParameterNames, injectTestParameters, prepareTestContext, resolveParameter
setApplicationContext, springTestContextAfterTestClass, springTestContextAfterTestMethod, springTestContextBeforeTestClass, springTestContextBeforeTestMethod, springTestContextPrepareTestInstance
public void simulate(Method method, TestContext context, org.springframework.context.ApplicationContext applicationContext)
TestSimulator
simulate
in interface TestSimulator
protected TestDesigner createTestDesigner(Method method, TestContext context)
TestNGCitrusTest
createTestDesigner
in class TestNGCitrusTest
protected void invokeTestMethod(org.testng.ITestResult testResult, Method method, TestCase testCase, TestContext context, int invocationCount)
TestNGCitrusTest
invokeTestMethod
in class TestNGCitrusTest
protected final boolean isDesignerMethod(Method method)
TestNGCitrusTest
isDesignerMethod
in class TestNGCitrusTest
protected final boolean isRunnerMethod(Method method)
TestNGCitrusTest
isRunnerMethod
in class TestNGCitrusTest
protected void executeTest()
executeTest
in class AbstractTestNGCitrusTest
protected void configure()
public TestCase getTestCase()
TestDesigner
getTestCase
in interface TestDesigner
getTestCase
in interface TestSimulator
getTestCase
in class AbstractTestNGCitrusTest
public void testClass(Class<?> type)
TestDesigner
testClass
in interface TestDesigner
public void name(String name)
TestDesigner
name
in interface TestDesigner
public void description(String description)
TestDesigner
description
in interface TestDesigner
public void author(String author)
TestDesigner
author
in interface TestDesigner
public void packageName(String packageName)
TestDesigner
packageName
in interface TestDesigner
public void status(TestCaseMetaInfo.Status status)
TestDesigner
status
in interface TestDesigner
public void creationDate(Date date)
TestDesigner
creationDate
in interface TestDesigner
public void variable(String name, Object value)
TestDesigner
variable
in interface TestDesigner
public CreateVariablesAction createVariable(String variableName, String value)
TestDesigner
createVariable
in interface TestDesigner
public void action(TestAction testAction)
TestDesigner
action
in interface TestDesigner
public ApplyTestBehaviorAction applyBehavior(TestBehavior behavior)
TestDesigner
applyBehavior
in interface TestDesigner
public <T extends AbstractActionContainer> AbstractTestContainerBuilder<T> container(T container)
TestDesigner
container
in interface TestDesigner
public AntRunBuilder antrun(String buildFilePath)
TestDesigner
antrun
in interface TestDesigner
public EchoAction echo(String message)
TestDesigner
echo
in interface TestDesigner
public ExecutePLSQLBuilder plsql(DataSource dataSource)
TestDesigner
plsql
in interface TestDesigner
public ExecuteSQLBuilder sql(DataSource dataSource)
TestDesigner
sql
in interface TestDesigner
public ExecuteSQLQueryBuilder query(DataSource dataSource)
TestDesigner
query
in interface TestDesigner
public ReceiveTimeoutBuilder receiveTimeout(Endpoint messageEndpoint)
TestDesigner
receiveTimeout
in interface TestDesigner
public ReceiveTimeoutBuilder receiveTimeout(String messageEndpointName)
TestDesigner
receiveTimeout
in interface TestDesigner
public FailAction fail(String message)
TestDesigner
fail
in interface TestDesigner
public InputActionBuilder input()
TestDesigner
input
in interface TestDesigner
public JavaActionBuilder java(String className)
TestDesigner
java
in interface TestDesigner
public JavaActionBuilder java(Class<?> clazz)
TestDesigner
java
in interface TestDesigner
public JavaActionBuilder java(Object instance)
TestDesigner
java
in interface TestDesigner
public LoadPropertiesAction load(String filePath)
TestDesigner
load
in interface TestDesigner
filePath
- path to properties file.public PurgeJmsQueuesBuilder purgeQueues()
TestDesigner
purgeQueues
in interface TestDesigner
public PurgeChannelsBuilder purgeChannels()
TestDesigner
purgeChannels
in interface TestDesigner
public PurgeEndpointsBuilder purgeEndpoints()
TestDesigner
purgeEndpoints
in interface TestDesigner
public ReceiveMessageBuilder receive(Endpoint messageEndpoint)
TestDesigner
receive
in interface TestDesigner
public ReceiveMessageBuilder receive(String messageEndpointName)
TestDesigner
receive
in interface TestDesigner
public SendMessageBuilder send(Endpoint messageEndpoint)
TestDesigner
send
in interface TestDesigner
public SendMessageBuilder send(String messageEndpointName)
TestDesigner
send
in interface TestDesigner
public SleepAction sleep()
TestDesigner
sleep
in interface TestDesigner
public SleepAction sleep(long milliseconds)
TestDesigner
sleep
in interface TestDesigner
public SleepAction sleep(double seconds)
TestDesigner
sleep
in interface TestDesigner
public WaitActionBuilder waitFor()
TestDesigner
waitFor
in interface TestDesigner
public StartServerAction start(Server... servers)
TestDesigner
start
in interface TestDesigner
public StartServerAction start(Server server)
TestDesigner
start
in interface TestDesigner
public StopServerAction stop(Server... servers)
TestDesigner
stop
in interface TestDesigner
public StopServerAction stop(Server server)
TestDesigner
stop
in interface TestDesigner
public StopTimeAction stopTime()
TestDesigner
stopTime
in interface TestDesigner
public StopTimeAction stopTime(String id)
TestDesigner
stopTime
in interface TestDesigner
public StopTimeAction stopTime(String id, String suffix)
TestDesigner
stopTime
in interface TestDesigner
public TraceVariablesAction traceVariables()
TestDesigner
traceVariables
in interface TestDesigner
public TraceVariablesAction traceVariables(String... variables)
TestDesigner
traceVariables
in interface TestDesigner
public GroovyActionBuilder groovy(String script)
TestDesigner
groovy
in interface TestDesigner
public GroovyActionBuilder groovy(org.springframework.core.io.Resource scriptResource)
TestDesigner
groovy
in interface TestDesigner
public TransformActionBuilder transform()
TestDesigner
transform
in interface TestDesigner
public AssertExceptionBuilder assertException()
TestDesigner
assertException
in interface TestDesigner
public CatchExceptionBuilder catchException()
TestDesigner
catchException
in interface TestDesigner
public AssertSoapFaultBuilder assertSoapFault()
TestDesigner
assertSoapFault
in interface TestDesigner
public ConditionalBuilder conditional()
TestDesigner
conditional
in interface TestDesigner
public IterateBuilder iterate()
TestDesigner
iterate
in interface TestDesigner
public ParallelBuilder parallel()
TestDesigner
parallel
in interface TestDesigner
public RepeatOnErrorBuilder repeatOnError()
TestDesigner
repeatOnError
in interface TestDesigner
public RepeatBuilder repeat()
TestDesigner
repeat
in interface TestDesigner
public SequenceBuilder sequential()
TestDesigner
sequential
in interface TestDesigner
public TimerBuilder timer()
TestDesigner
timer
in interface TestDesigner
public StopTimerAction stopTimer(String timerId)
TestDesigner
stopTimer
in interface TestDesigner
public StopTimerAction stopTimers()
TestDesigner
stopTimers
in interface TestDesigner
public DockerActionBuilder docker()
TestDesigner
docker
in interface TestDesigner
public KubernetesActionBuilder kubernetes()
TestDesigner
kubernetes
in interface TestDesigner
public SeleniumActionBuilder selenium()
TestDesigner
selenium
in interface TestDesigner
public HttpActionBuilder http()
http
in interface TestDesigner
public SoapActionBuilder soap()
soap
in interface TestDesigner
public CamelRouteActionBuilder camel()
TestDesigner
camel
in interface TestDesigner
public ZooActionBuilder zookeeper()
TestDesigner
zookeeper
in interface TestDesigner
public TemplateBuilder applyTemplate(String name)
TestDesigner
applyTemplate
in interface TestDesigner
public FinallySequenceBuilder doFinally()
TestDesigner
doFinally
in interface TestDesigner
Copyright © 2008–2017 ConSol Software GmbH. All rights reserved.