com.eviware.soapui.tools
Class SoapUISecurityTestRunner

java.lang.Object
  extended by com.eviware.soapui.tools.AbstractSoapUIRunner
      extended by com.eviware.soapui.tools.AbstractSoapUITestRunner
          extended by com.eviware.soapui.tools.SoapUITestCaseRunner
              extended by com.eviware.soapui.tools.SoapUISecurityTestRunner
All Implemented Interfaces:
TestRunListener, SecurityTestRunListener, CmdLineRunner

public class SoapUISecurityTestRunner
extends SoapUITestCaseRunner
implements SecurityTestRunListener

Standalone security test-runner used from maven-plugin, can also be used from command-line (see xdocs) or directly from other classes.

For standalone usage, set the project file (with setProjectFile) and other desired properties before calling run

Author:
nebojsa.tasic

Nested Class Summary
 
Nested classes/interfaces inherited from class com.eviware.soapui.tools.SoapUITestCaseRunner
SoapUITestCaseRunner.InternalProjectRunListener
 
Nested classes/interfaces inherited from class com.eviware.soapui.tools.AbstractSoapUIRunner
AbstractSoapUIRunner.SoapUIOptions
 
Field Summary
static java.lang.String SOAPUI_EXPORT_SEPARATOR
           
static java.lang.String TITLE
           
 
Fields inherited from class com.eviware.soapui.tools.AbstractSoapUIRunner
log
 
Constructor Summary
SoapUISecurityTestRunner()
           
SoapUISecurityTestRunner(java.lang.String title)
           
 
Method Summary
protected  void addListeners(TestCase tc)
           
 void afterOriginalStep(TestCaseRunner testRunner, SecurityTestRunContext runContext, SecurityTestStepResult result)
           
 void afterRun(TestCaseRunner testRunner, SecurityTestRunContext runContext)
           
 void afterRun(TestCaseRunner testRunner, TestCaseRunContext runContext)
           
 void afterSecurityScan(TestCaseRunner testRunner, SecurityTestRunContext runContext, SecurityScanResult securityScanResult)
           
 void afterSecurityScanRequest(TestCaseRunner testRunner, SecurityTestRunContext runContext, SecurityScanRequestResult securityScanReqResult)
           
 void afterStep(TestCaseRunner testRunner, SecurityTestRunContext runContext, SecurityTestStepResult result)
           
 void afterStep(TestCaseRunner testRunner, TestCaseRunContext runContext, TestStepResult result)
           
 void beforeRun(TestCaseRunner testRunner, SecurityTestRunContext runContext)
           
 void beforeRun(TestCaseRunner testRunner, TestCaseRunContext runContext)
           
 void beforeSecurityScan(TestCaseRunner testRunner, SecurityTestRunContext runContext, SecurityScan securityScan)
           
 void beforeStep(TestCaseRunner testRunner, SecurityTestRunContext runContext, TestStepResult testStepResult)
           
 void beforeStep(TestCaseRunner testRunner, TestCaseRunContext runContext, TestStep currentStep)
           
 void exportJUnitReports(JUnitSecurityReportCollector collector, java.lang.String folder, WsdlProject project)
           
protected  void exportReports(WsdlProject project)
           
protected  AbstractSoapUIRunner.SoapUIOptions initCommandLineOptions()
           
protected  void initProject(WsdlProject project)
           
static void main(java.lang.String[] args)
          Runs the tests in the specified soapUI project file, see soapUI xdocs for details.
 void printReport(long timeTaken)
           
protected  boolean processCommandLine(org.apache.commons.cli.CommandLine cmd)
           
protected  void runProject(WsdlProject project)
           
 boolean runRunner()
           
protected  void runSecurityTest(SecurityTest securityTest)
           
protected  void runSuite(WsdlTestSuite suite)
          Run tests in the specified TestSuite
protected  void runTestCase(WsdlTestCase testCase)
          Runs the SecurityTests in the specified TestCase
 void setSecurityTestName(java.lang.String securityTestName)
           
 
Methods inherited from class com.eviware.soapui.tools.SoapUITestCaseRunner
createJUnitSecurityReportCollector, exportJUnitReports, getAssertionResults, getAssertions, getExportCount, getFailedTests, getMaxErrors, getProjectPassword, getTestCase, getTestStepCount, getTestSuite, isExportAll, isIgnoreErrors, isJunitReport, isJUnitReport, isPrintReport, isSaveAfterRun, removeListeners, setExportAll, setExportCount, setIgnoreError, setIgnoreErrors, setJUnitReport, setMaxErrors, setPrintReport, setProjectPassword, setSaveAfterRun, setTestCase, setTestStepCount, setTestSuite, throwFailureException
 
Methods inherited from class com.eviware.soapui.tools.AbstractSoapUITestRunner
beforeStep, getDomain, getEndpoint, getHost, getPassword, getUsername, getWssPasswordType, prepareRequestStep, setDomain, setEndpoint, setHost, setPassword, setUsername, setWssPasswordType
 
Methods inherited from class com.eviware.soapui.tools.AbstractSoapUIRunner
createSoapUICore, ensureFolder, ensureOutputFolder, getAbsoluteOutputFolder, getCommandLineOptionSubstSpace, getLog, getModelItemOutputFolder, getOutputFolder, getProjectFile, getProjectProperties, getSettingsFile, getSoapUISettingsPassword, initFromCommandLine, initGroovyLog, initProjectProperties, isEnableUI, run, runFromCommandLine, setEnableUI, setGlobalProperties, setOutputFolder, setProjectFile, setProjectProperties, setSettingsFile, setSoapUISettingsPassword, setSystemProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOAPUI_EXPORT_SEPARATOR

public static final java.lang.String SOAPUI_EXPORT_SEPARATOR
See Also:
Constant Field Values

TITLE

public static final java.lang.String TITLE
See Also:
Constant Field Values
Constructor Detail

SoapUISecurityTestRunner

public SoapUISecurityTestRunner()

SoapUISecurityTestRunner

public SoapUISecurityTestRunner(java.lang.String title)
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Runs the tests in the specified soapUI project file, see soapUI xdocs for details.

Parameters:
args -
Throws:
java.lang.Exception

processCommandLine

protected boolean processCommandLine(org.apache.commons.cli.CommandLine cmd)
Overrides:
processCommandLine in class SoapUITestCaseRunner

setSecurityTestName

public void setSecurityTestName(java.lang.String securityTestName)

initCommandLineOptions

protected AbstractSoapUIRunner.SoapUIOptions initCommandLineOptions()
Overrides:
initCommandLineOptions in class SoapUITestCaseRunner

runRunner

public boolean runRunner()
                  throws java.lang.Exception
Overrides:
runRunner in class SoapUITestCaseRunner
Throws:
java.lang.Exception

runProject

protected void runProject(WsdlProject project)
Overrides:
runProject in class SoapUITestCaseRunner

initProject

protected void initProject(WsdlProject project)
                    throws java.lang.Exception
Overrides:
initProject in class SoapUITestCaseRunner
Throws:
java.lang.Exception

exportReports

protected void exportReports(WsdlProject project)
                      throws java.lang.Exception
Overrides:
exportReports in class SoapUITestCaseRunner
Throws:
java.lang.Exception

addListeners

protected void addListeners(TestCase tc)
Overrides:
addListeners in class SoapUITestCaseRunner

exportJUnitReports

public void exportJUnitReports(JUnitSecurityReportCollector collector,
                               java.lang.String folder,
                               WsdlProject project)
                        throws java.lang.Exception
Throws:
java.lang.Exception

printReport

public void printReport(long timeTaken)
Overrides:
printReport in class SoapUITestCaseRunner

runSuite

protected void runSuite(WsdlTestSuite suite)
Run tests in the specified TestSuite

Overrides:
runSuite in class SoapUITestCaseRunner
Parameters:
suite - the TestSuite to run

runTestCase

protected void runTestCase(WsdlTestCase testCase)
Runs the SecurityTests in the specified TestCase

Overrides:
runTestCase in class SoapUITestCaseRunner
Parameters:
testCase - the testcase to run
context -

runSecurityTest

protected void runSecurityTest(SecurityTest securityTest)
Parameters:
securityTest -

beforeRun

public void beforeRun(TestCaseRunner testRunner,
                      TestCaseRunContext runContext)
Specified by:
beforeRun in interface TestRunListener
Overrides:
beforeRun in class SoapUITestCaseRunner

beforeStep

public void beforeStep(TestCaseRunner testRunner,
                       TestCaseRunContext runContext,
                       TestStep currentStep)
Specified by:
beforeStep in interface TestRunListener
Overrides:
beforeStep in class SoapUITestCaseRunner

afterStep

public void afterStep(TestCaseRunner testRunner,
                      TestCaseRunContext runContext,
                      TestStepResult result)
Specified by:
afterStep in interface TestRunListener
Overrides:
afterStep in class SoapUITestCaseRunner

afterStep

public void afterStep(TestCaseRunner testRunner,
                      SecurityTestRunContext runContext,
                      SecurityTestStepResult result)
Specified by:
afterStep in interface SecurityTestRunListener

afterRun

public void afterRun(TestCaseRunner testRunner,
                     TestCaseRunContext runContext)
Specified by:
afterRun in interface TestRunListener
Overrides:
afterRun in class SoapUITestCaseRunner

afterOriginalStep

public void afterOriginalStep(TestCaseRunner testRunner,
                              SecurityTestRunContext runContext,
                              SecurityTestStepResult result)
Specified by:
afterOriginalStep in interface SecurityTestRunListener

afterRun

public void afterRun(TestCaseRunner testRunner,
                     SecurityTestRunContext runContext)
Specified by:
afterRun in interface SecurityTestRunListener

afterSecurityScan

public void afterSecurityScan(TestCaseRunner testRunner,
                              SecurityTestRunContext runContext,
                              SecurityScanResult securityScanResult)
Specified by:
afterSecurityScan in interface SecurityTestRunListener

afterSecurityScanRequest

public void afterSecurityScanRequest(TestCaseRunner testRunner,
                                     SecurityTestRunContext runContext,
                                     SecurityScanRequestResult securityScanReqResult)
Specified by:
afterSecurityScanRequest in interface SecurityTestRunListener

beforeRun

public void beforeRun(TestCaseRunner testRunner,
                      SecurityTestRunContext runContext)
Specified by:
beforeRun in interface SecurityTestRunListener

beforeSecurityScan

public void beforeSecurityScan(TestCaseRunner testRunner,
                               SecurityTestRunContext runContext,
                               SecurityScan securityScan)
Specified by:
beforeSecurityScan in interface SecurityTestRunListener

beforeStep

public void beforeStep(TestCaseRunner testRunner,
                       SecurityTestRunContext runContext,
                       TestStepResult testStepResult)
Specified by:
beforeStep in interface SecurityTestRunListener


Copyright © 2005-2011 eviware.com. All Rights Reserved.