public abstract class AbstractSoapUIRunner extends Object implements CmdLineRunner
Modifier and Type | Class and Description |
---|---|
static class |
AbstractSoapUIRunner.SoapUIOptions |
Modifier and Type | Field and Description |
---|---|
static int |
ABNORMAL_TERMINATION |
protected org.apache.log4j.Logger |
log |
static int |
NORMAL_TERMINATION |
Constructor and Description |
---|
AbstractSoapUIRunner(String title) |
Modifier and Type | Method and Description |
---|---|
protected SoapUICore |
createSoapUICore() |
protected void |
ensureConsoleAppenderIsDefined(org.apache.log4j.Logger logger)
Ensure there is one (and only one) ConsoleAppender instance configured for
logger . |
void |
ensureFolder(String path) |
protected void |
ensureOutputFolder(ModelItem modelItem) |
String |
getAbsoluteOutputFolder(ModelItem modelItem) |
protected String |
getCommandLineOptionSubstSpace(org.apache.commons.cli.CommandLine cmd,
String key) |
org.apache.log4j.Logger |
getLog() |
String |
getModelItemOutputFolder(ModelItem modelItem) |
String |
getOutputFolder() |
String |
getProjectFile() |
String |
getProjectPassword() |
String[] |
getProjectProperties() |
String |
getSettingsFile() |
String |
getSoapUISettingsPassword() |
protected abstract AbstractSoapUIRunner.SoapUIOptions |
initCommandLineOptions() |
boolean |
initFromCommandLine(String[] args,
boolean printHelp) |
protected void |
initGroovyLog() |
protected void |
initProjectProperties(WsdlProject project) |
boolean |
isEnableUI() |
protected abstract boolean |
processCommandLine(org.apache.commons.cli.CommandLine cmd) |
protected boolean |
requiresProjectArgument(org.apache.commons.cli.CommandLine cmd)
Checks if the command line arguments require a project file
|
boolean |
run()
Main method to use for running the configured tests.
|
int |
run(String[] args)
Runs the testrunner
|
int |
runFromCommandLine(String[] args)
Validates the command line arguments and runs the test runner if vaild
|
protected abstract boolean |
runRunner() |
void |
setCustomHeaders(String[] optionValues) |
void |
setEnableUI(boolean enableUI) |
void |
setGlobalProperties(String[] optionValues) |
void |
setOutputFolder(String outputFolder) |
void |
setProjectFile(String projectFile)
Sets the SoapUI project file containing the tests to run
|
void |
setProjectPassword(String projectPassword) |
void |
setProjectProperties(String[] projectProperties) |
void |
setSettingsFile(String settingsFile)
Sets the SoapUI settings file containing the tests to run
|
void |
setSoapUISettingsPassword(String soapUISettingsPassword) |
void |
setSystemProperties(String[] optionValues) |
boolean |
validateCommandLineArgument(String[] args) |
public static final int NORMAL_TERMINATION
public static final int ABNORMAL_TERMINATION
protected final org.apache.log4j.Logger log
public AbstractSoapUIRunner(String title)
protected void initGroovyLog()
protected void ensureConsoleAppenderIsDefined(org.apache.log4j.Logger logger)
logger
.logger
- public int runFromCommandLine(String[] args)
args
- the commandline arguments to the runnerSystem
public boolean validateCommandLineArgument(String[] args)
public int run(String[] args)
args
- the command line arguments to be passed to the testrunnerSystem
public boolean initFromCommandLine(String[] args, boolean printHelp) throws Exception
Exception
protected boolean requiresProjectArgument(org.apache.commons.cli.CommandLine cmd)
cmd
- The command linepublic final boolean run() throws Exception
Exception
- if an error or failure occurs during test executionprotected SoapUICore createSoapUICore()
protected abstract boolean processCommandLine(org.apache.commons.cli.CommandLine cmd)
protected abstract AbstractSoapUIRunner.SoapUIOptions initCommandLineOptions()
protected String getCommandLineOptionSubstSpace(org.apache.commons.cli.CommandLine cmd, String key)
public String getProjectFile()
getProjectFile
in interface CmdLineRunner
public String getSettingsFile()
getSettingsFile
in interface CmdLineRunner
public void setOutputFolder(String outputFolder)
public String getOutputFolder()
getOutputFolder
in interface CmdLineRunner
protected void ensureOutputFolder(ModelItem modelItem)
public void ensureFolder(String path)
public void setProjectFile(String projectFile)
projectFile
- the SoapUI project file containing the tests to runpublic void setSettingsFile(String settingsFile)
settingsFile
- the SoapUI settings file to usepublic void setEnableUI(boolean enableUI)
public String getSoapUISettingsPassword()
public void setSoapUISettingsPassword(String soapUISettingsPassword)
public void setSystemProperties(String[] optionValues)
public void setCustomHeaders(String[] optionValues)
public void setGlobalProperties(String[] optionValues)
public void setProjectProperties(String[] projectProperties)
public org.apache.log4j.Logger getLog()
getLog
in interface CmdLineRunner
public String[] getProjectProperties()
getProjectProperties
in interface CmdLineRunner
protected void initProjectProperties(WsdlProject project)
public boolean isEnableUI()
public String getProjectPassword()
public void setProjectPassword(String projectPassword)
Copyright © 2019. All Rights Reserved.