public class DefaultTestDesigner extends Object implements TestDesigner
| Modifier and Type | Field and Description |
|---|---|
protected Stack<AbstractActionContainer> |
containers
Optional stack of containers cached for execution
|
| Modifier | Constructor and Description |
|---|---|
|
DefaultTestDesigner()
Default constructor
|
|
DefaultTestDesigner(org.springframework.context.ApplicationContext applicationContext,
TestContext context)
Constructor using Spring bean application context.
|
protected |
DefaultTestDesigner(TestCase testCase)
Constructor initializing test case.
|
| 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.
|
AsyncBuilder |
async()
Adds async container with nested test actions.
|
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.
|
<T extends AbstractActionContainer> |
container(T container)
Prepare and add a custom container implementation.
|
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.
|
FailAction |
fail(String message)
Creates a new fail action.
|
org.springframework.context.ApplicationContext |
getApplicationContext()
Gets the Spring bean application context.
|
TestCase |
getTestCase()
Builds the test case.
|
TestContext |
getTestContext()
Gets the test context.
|
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() |
protected void |
initialize() |
InputActionBuilder |
input()
Creates a new input action.
|
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 messageEndpointUri)
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 messageEndpointUri)
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 messageEndpointUri)
Create send message action definition with message endpoint name.
|
SequenceBuilder |
sequential()
Adds sequential container with nested test actions.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Sets the application context either from ApplicationContextAware injection or from outside.
|
void |
setTestContext(TestContext context)
Sets the test context.
|
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.
|
WaitBuilder |
waitFor()
Add wait action.
|
ZooActionBuilder |
zookeeper()
Creates a new zookeeper execute action.
|
protected Stack<AbstractActionContainer> containers
public DefaultTestDesigner()
protected DefaultTestDesigner(TestCase testCase)
testCase - public DefaultTestDesigner(org.springframework.context.ApplicationContext applicationContext,
TestContext context)
applicationContext - context - protected void initialize()
public void testClass(Class<?> type)
TestDesignertestClass in interface TestDesignerpublic void name(String name)
TestDesignername in interface TestDesignerpublic void description(String description)
TestDesignerdescription in interface TestDesignerpublic void author(String author)
TestDesignerauthor in interface TestDesignerpublic void packageName(String packageName)
TestDesignerpackageName in interface TestDesignerpublic void status(TestCaseMetaInfo.Status status)
TestDesignerstatus in interface TestDesignerpublic void creationDate(Date date)
TestDesignercreationDate in interface TestDesignerpublic void variable(String name, Object value)
TestDesignervariable in interface TestDesignerpublic void action(TestAction testAction)
TestDesigneraction in interface TestDesignerpublic ApplyTestBehaviorAction applyBehavior(TestBehavior behavior)
TestDesignerapplyBehavior in interface TestDesignerpublic <T extends AbstractActionContainer> AbstractTestContainerBuilder<T> container(T container)
TestDesignercontainer in interface TestDesignerpublic CreateVariablesAction createVariable(String variableName, String value)
TestDesignercreateVariable in interface TestDesignerpublic AntRunBuilder antrun(String buildFilePath)
TestDesignerantrun in interface TestDesignerpublic EchoAction echo(String message)
TestDesignerecho in interface TestDesignerpublic ExecutePLSQLBuilder plsql(DataSource dataSource)
TestDesignerplsql in interface TestDesignerpublic ExecuteSQLBuilder sql(DataSource dataSource)
TestDesignersql in interface TestDesignerpublic ExecuteSQLQueryBuilder query(DataSource dataSource)
TestDesignerquery in interface TestDesignerpublic ReceiveTimeoutBuilder receiveTimeout(Endpoint messageEndpoint)
TestDesignerreceiveTimeout in interface TestDesignerpublic ReceiveTimeoutBuilder receiveTimeout(String messageEndpointUri)
TestDesignerreceiveTimeout in interface TestDesignerpublic FailAction fail(String message)
TestDesignerfail in interface TestDesignerpublic InputActionBuilder input()
TestDesignerinput in interface TestDesignerpublic JavaActionBuilder java(String className)
TestDesignerjava in interface TestDesignerpublic JavaActionBuilder java(Class<?> clazz)
TestDesignerjava in interface TestDesignerpublic JavaActionBuilder java(Object instance)
TestDesignerjava in interface TestDesignerpublic LoadPropertiesAction load(String filePath)
TestDesignerload in interface TestDesignerfilePath - path to properties file.public PurgeJmsQueuesBuilder purgeQueues()
TestDesignerpurgeQueues in interface TestDesignerpublic PurgeChannelsBuilder purgeChannels()
TestDesignerpurgeChannels in interface TestDesignerpublic PurgeEndpointsBuilder purgeEndpoints()
TestDesignerpurgeEndpoints in interface TestDesignerpublic ReceiveMessageBuilder receive(Endpoint messageEndpoint)
TestDesignerreceive in interface TestDesignerpublic ReceiveMessageBuilder receive(String messageEndpointUri)
TestDesignerreceive in interface TestDesignerpublic SendMessageBuilder send(Endpoint messageEndpoint)
TestDesignersend in interface TestDesignerpublic SendMessageBuilder send(String messageEndpointUri)
TestDesignersend in interface TestDesignerpublic SleepAction sleep()
TestDesignersleep in interface TestDesignerpublic SleepAction sleep(long milliseconds)
TestDesignersleep in interface TestDesignerpublic SleepAction sleep(double seconds)
TestDesignersleep in interface TestDesignerpublic WaitBuilder waitFor()
TestDesignerwaitFor in interface TestDesignerpublic StartServerAction start(Server... servers)
TestDesignerstart in interface TestDesignerpublic StartServerAction start(Server server)
TestDesignerstart in interface TestDesignerpublic StopServerAction stop(Server... servers)
TestDesignerstop in interface TestDesignerpublic StopServerAction stop(Server server)
TestDesignerstop in interface TestDesignerpublic StopTimeAction stopTime()
TestDesignerstopTime in interface TestDesignerpublic StopTimeAction stopTime(String id)
TestDesignerstopTime in interface TestDesignerpublic StopTimeAction stopTime(String id, String suffix)
TestDesignerstopTime in interface TestDesignerpublic TraceVariablesAction traceVariables()
TestDesignertraceVariables in interface TestDesignerpublic TraceVariablesAction traceVariables(String... variables)
TestDesignertraceVariables in interface TestDesignerpublic GroovyActionBuilder groovy(String script)
TestDesignergroovy in interface TestDesignerpublic GroovyActionBuilder groovy(org.springframework.core.io.Resource scriptResource)
TestDesignergroovy in interface TestDesignerpublic TransformActionBuilder transform()
TestDesignertransform in interface TestDesignerpublic AssertExceptionBuilder assertException()
TestDesignerassertException in interface TestDesignerpublic CatchExceptionBuilder catchException()
TestDesignercatchException in interface TestDesignerpublic AssertSoapFaultBuilder assertSoapFault()
TestDesignerassertSoapFault in interface TestDesignerpublic ConditionalBuilder conditional()
TestDesignerconditional in interface TestDesignerpublic IterateBuilder iterate()
TestDesigneriterate in interface TestDesignerpublic ParallelBuilder parallel()
TestDesignerparallel in interface TestDesignerpublic RepeatOnErrorBuilder repeatOnError()
TestDesignerrepeatOnError in interface TestDesignerpublic RepeatBuilder repeat()
TestDesignerrepeat in interface TestDesignerpublic SequenceBuilder sequential()
TestDesignersequential in interface TestDesignerpublic AsyncBuilder async()
TestDesignerasync in interface TestDesignerpublic TimerBuilder timer()
TestDesignertimer in interface TestDesignerpublic StopTimerAction stopTimer(String timerId)
TestDesignerstopTimer in interface TestDesignerpublic StopTimerAction stopTimers()
TestDesignerstopTimers in interface TestDesignerpublic DockerActionBuilder docker()
TestDesignerdocker in interface TestDesignerpublic KubernetesActionBuilder kubernetes()
TestDesignerkubernetes in interface TestDesignerpublic SeleniumActionBuilder selenium()
TestDesignerselenium in interface TestDesignerpublic HttpActionBuilder http()
http in interface TestDesignerpublic SoapActionBuilder soap()
soap in interface TestDesignerpublic CamelRouteActionBuilder camel()
TestDesignercamel in interface TestDesignerpublic ZooActionBuilder zookeeper()
TestDesignerzookeeper in interface TestDesignerpublic TemplateBuilder applyTemplate(String name)
TestDesignerapplyTemplate in interface TestDesignerpublic FinallySequenceBuilder doFinally()
TestDesignerdoFinally in interface TestDesignerpublic TestCase getTestCase()
getTestCase in interface TestDesignerpublic org.springframework.context.ApplicationContext getApplicationContext()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext in interface org.springframework.context.ApplicationContextAwareapplicationContext - public TestContext getTestContext()
public void setTestContext(TestContext context)
context - Copyright © 2008–2019 ConSol Software GmbH. All rights reserved.