com.eviware.soapui.tools
Class SoapUILoadTestRunner

java.lang.Object
  extended by com.eviware.soapui.tools.AbstractSoapUIRunner
      extended by com.eviware.soapui.tools.AbstractSoapUITestRunner
          extended by com.eviware.soapui.tools.SoapUILoadTestRunner
All Implemented Interfaces:
LoadTestRunListener, TestRunListener

public class SoapUILoadTestRunner
extends AbstractSoapUITestRunner
implements LoadTestRunListener

Standalone 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:
Ole.Matzura

Nested Class Summary
 
Nested classes/interfaces inherited from class com.eviware.soapui.tools.AbstractSoapUIRunner
AbstractSoapUIRunner.SoapUIOptions
 
Field Summary
static java.lang.String TITLE
           
 
Fields inherited from class com.eviware.soapui.tools.AbstractSoapUIRunner
log
 
Constructor Summary
SoapUILoadTestRunner()
           
SoapUILoadTestRunner(java.lang.String title)
           
 
Method Summary
 void afterLoadTest(LoadTestRunner loadTestRunner, LoadTestRunContext context)
          Called after the execution of a loadtest when all threads have terminated
 void afterTestCase(LoadTestRunner loadTestRunner, LoadTestRunContext context, TestRunner testRunner, TestRunContext runContext)
          Called after the execution of a testcase
 void afterTestStep(LoadTestRunner loadTestRunner, LoadTestRunContext context, TestRunner testRunner, TestRunContext runContext, TestStepResult testStepResult)
          Called after the execution of a teststep
 void beforeLoadTest(LoadTestRunner loadTestRunner, LoadTestRunContext context)
          Called before a load-test is about to be run
 void beforeTestCase(LoadTestRunner loadTestRunner, LoadTestRunContext context, TestRunner testRunner, TestRunContext runContext)
          Called before the execution of a testcase
 void beforeTestStep(LoadTestRunner loadTestRunner, LoadTestRunContext context, TestRunner testRunner, TestRunContext runContext, TestStep testStep)
          Called before the execution of a teststep
protected  AbstractSoapUIRunner.SoapUIOptions initCommandLineOptions()
           
 void loadTestStarted(LoadTestRunner loadTestRunner, LoadTestRunContext context)
          Called after all initial loadtest threads have been started
 void loadTestStopped(LoadTestRunner loadTestRunner, LoadTestRunContext context)
          Called when a loadtest has been stopped for some reason
static void main(java.lang.String[] args)
          Runs the loadtests in the specified soapUI project file, see soapUI xdocs for details.
protected  boolean processCommandLine(org.apache.commons.cli.CommandLine cmd)
           
 boolean runRunner()
          Runs the testcases as configured with setXXX methods
 void runSuite(TestSuite suite)
          Run tests in the specified TestSuite
 void setLimit(int limit)
           
 void setLoadTest(java.lang.String loadTest)
           
 void setPrintReport(boolean printReport)
           
 void setTestCase(java.lang.String testCase)
          Sets the testcase to run
 void setTestSuite(java.lang.String testSuite)
          Sets the TestSuite to run.
 void setThreadCount(long threadCount)
           
 
Methods inherited from class com.eviware.soapui.tools.AbstractSoapUITestRunner
afterRun, afterStep, beforeRun, beforeStep, getDomain, getEndpoint, getHost, getPassword, getProjectPassword, getUsername, getWssPasswordType, prepareRequestStep, setDomain, setEndpoint, setHost, setPassword, setProjectPassword, setUsername, setWssPasswordType
 
Methods inherited from class com.eviware.soapui.tools.AbstractSoapUIRunner
createSoapUICore, ensureFolder, ensureOutputFolder, getAbsoluteOutputFolder, getCommandLineOptionSubstSpace, getOutputFolder, getProjectFile, getSettingsFile, getSoapUISettingsPassword, initFromCommandLine, initGroovyLog, run, runFromCommandLine, setEnableUI, setGlobalProperties, setOutputFolder, setProjectFile, setSettingsFile, setSoapUISettingsPassword, setSystemProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TITLE

public static java.lang.String TITLE
Constructor Detail

SoapUILoadTestRunner

public SoapUILoadTestRunner()

SoapUILoadTestRunner

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

main

public static void main(java.lang.String[] args)
Runs the loadtests 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)
Specified by:
processCommandLine in class AbstractSoapUIRunner

setLimit

public void setLimit(int limit)

setThreadCount

public void setThreadCount(long threadCount)

initCommandLineOptions

protected AbstractSoapUIRunner.SoapUIOptions initCommandLineOptions()
Specified by:
initCommandLineOptions in class AbstractSoapUIRunner

setLoadTest

public void setLoadTest(java.lang.String loadTest)

setPrintReport

public void setPrintReport(boolean printReport)

runRunner

public boolean runRunner()
                  throws java.lang.Exception
Runs the testcases as configured with setXXX methods

Specified by:
runRunner in class AbstractSoapUIRunner
Throws:
java.lang.Exception - thrown if any tests fail

runSuite

public void runSuite(TestSuite suite)
Run tests in the specified TestSuite

Parameters:
suite - the TestSuite to run

setTestCase

public void setTestCase(java.lang.String testCase)
Sets the testcase to run

Parameters:
testCase - the testcase to run

setTestSuite

public void setTestSuite(java.lang.String testSuite)
Sets the TestSuite to run. If not set all TestSuites in the specified project file are run

Parameters:
testSuite - the testSuite to run.

afterLoadTest

public void afterLoadTest(LoadTestRunner loadTestRunner,
                          LoadTestRunContext context)
Description copied from interface: LoadTestRunListener
Called after the execution of a loadtest when all threads have terminated

Specified by:
afterLoadTest in interface LoadTestRunListener

afterTestCase

public void afterTestCase(LoadTestRunner loadTestRunner,
                          LoadTestRunContext context,
                          TestRunner testRunner,
                          TestRunContext runContext)
Description copied from interface: LoadTestRunListener
Called after the execution of a testcase

Specified by:
afterTestCase in interface LoadTestRunListener

afterTestStep

public void afterTestStep(LoadTestRunner loadTestRunner,
                          LoadTestRunContext context,
                          TestRunner testRunner,
                          TestRunContext runContext,
                          TestStepResult testStepResult)
Description copied from interface: LoadTestRunListener
Called after the execution of a teststep

Specified by:
afterTestStep in interface LoadTestRunListener

beforeLoadTest

public void beforeLoadTest(LoadTestRunner loadTestRunner,
                           LoadTestRunContext context)
Description copied from interface: LoadTestRunListener
Called before a load-test is about to be run

Specified by:
beforeLoadTest in interface LoadTestRunListener

beforeTestCase

public void beforeTestCase(LoadTestRunner loadTestRunner,
                           LoadTestRunContext context,
                           TestRunner testRunner,
                           TestRunContext runContext)
Description copied from interface: LoadTestRunListener
Called before the execution of a testcase

Specified by:
beforeTestCase in interface LoadTestRunListener

beforeTestStep

public void beforeTestStep(LoadTestRunner loadTestRunner,
                           LoadTestRunContext context,
                           TestRunner testRunner,
                           TestRunContext runContext,
                           TestStep testStep)
Description copied from interface: LoadTestRunListener
Called before the execution of a teststep

Specified by:
beforeTestStep in interface LoadTestRunListener

loadTestStarted

public void loadTestStarted(LoadTestRunner loadTestRunner,
                            LoadTestRunContext context)
Description copied from interface: LoadTestRunListener
Called after all initial loadtest threads have been started

Specified by:
loadTestStarted in interface LoadTestRunListener

loadTestStopped

public void loadTestStopped(LoadTestRunner loadTestRunner,
                            LoadTestRunContext context)
Description copied from interface: LoadTestRunListener
Called when a loadtest has been stopped for some reason

Specified by:
loadTestStopped in interface LoadTestRunListener


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