com.eviware.soapui.impl.wsdl.support
Class AbstractTestCaseRunner<T extends TestRunnable,T2 extends WsdlTestRunContext>

java.lang.Object
  extended by com.eviware.soapui.impl.wsdl.support.AbstractTestRunner<T,T2>
      extended by com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner<T,T2>
All Implemented Interfaces:
TestCaseRunner, TestRunner, java.lang.Runnable
Direct Known Subclasses:
SecurityTestRunnerImpl, WsdlTestCaseRunner

public abstract class AbstractTestCaseRunner<T extends TestRunnable,T2 extends WsdlTestRunContext>
extends AbstractTestRunner<T,T2>
implements TestCaseRunner

Abstract runner class - runs all steps in a TestCase or a SecurityTest and collects performance data

Author:
dragica.soldo

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.eviware.soapui.model.testsuite.TestRunner
TestRunner.Status
 
Constructor Summary
AbstractTestCaseRunner(T modelItem, StringToObjectMap properties)
           
 
Method Summary
protected  void clear(T2 runContext)
           
 void enforceMaxResults(long maxResults)
           
protected abstract  void failTestRunnableOnErrors(T2 runContext)
           
protected  void fillInTestRunnableListeners()
           
 int getGotoStepIndex()
           
 int getResultCount()
           
 java.util.List<TestStepResult> getResults()
          Gets the accumulated results so far; each TestStep returns a TestStepResult when running.
 int getStartStep()
           
abstract  WsdlTestCase getTestCase()
          Gets the TestCase being run
 long getTimeTaken()
          Returns the time taken by this runner since its last start
 void gotoStep(int index)
          Transfers execution of this TestRunner to the TestStep with the specified index in the TestCase
 void gotoStepByName(java.lang.String stepName)
          Transfers execution of this TestRunner to the TestStep with the specified name in the TestCase
protected  void internalFinally(T2 runContext)
           
 void internalRun(T2 runContext)
           
protected  void notifyAfterRun()
           
protected  void notifyBeforeRun()
           
 void onCancel(java.lang.String reason)
           
 void onFail(java.lang.String reason)
           
protected abstract  int runCurrentTestStep(T2 runContext, int currentStepIndex)
          Runs current testStep , returns index of the next step to be run and -2 in case execution should break if canceled
protected  void runSetupScripts(T2 runContext)
           
protected  void runTearDownScripts(T2 runContext)
           
 TestStepResult runTestStep(TestStep testStep)
           
 TestStepResult runTestStep(TestStep testStep, boolean discard, boolean process)
           
 TestStepResult runTestStepByName(java.lang.String name)
          Runs the specified TestStep and returns the result
 void setResultCount(int resultCount)
           
 void setStartStep(int startStep)
           
 
Methods inherited from class com.eviware.soapui.impl.wsdl.support.AbstractTestRunner
cancel, createContext, fail, getError, getId, getReason, getRunContext, getStartTime, getStatus, getTestRunnable, getThread, isCanceled, isFailed, isRunning, run, setError, setStartTime, setStatus, setTimeTaken, start, startTimeoutTimer, waitUntilFinished
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.eviware.soapui.model.testsuite.TestCaseRunner
getRunContext
 
Methods inherited from interface com.eviware.soapui.model.testsuite.TestRunner
cancel, fail, getReason, getStartTime, getStatus, getTestRunnable, isRunning, start, waitUntilFinished
 

Constructor Detail

AbstractTestCaseRunner

public AbstractTestCaseRunner(T modelItem,
                              StringToObjectMap properties)
Method Detail

getGotoStepIndex

public int getGotoStepIndex()

getStartStep

public int getStartStep()

setStartStep

public void setStartStep(int startStep)

onCancel

public void onCancel(java.lang.String reason)
Overrides:
onCancel in class AbstractTestRunner<T extends TestRunnable,T2 extends WsdlTestRunContext>

onFail

public void onFail(java.lang.String reason)
Overrides:
onFail in class AbstractTestRunner<T extends TestRunnable,T2 extends WsdlTestRunContext>

internalRun

public void internalRun(T2 runContext)
                 throws java.lang.Exception
Specified by:
internalRun in class AbstractTestRunner<T extends TestRunnable,T2 extends WsdlTestRunContext>
Throws:
java.lang.Exception

failTestRunnableOnErrors

protected abstract void failTestRunnableOnErrors(T2 runContext)

runCurrentTestStep

protected abstract int runCurrentTestStep(T2 runContext,
                                          int currentStepIndex)
                                   throws java.lang.Exception
Runs current testStep , returns index of the next step to be run and -2 in case execution should break if canceled

Parameters:
runContext -
currentStepIndex -
Returns:
Throws:
java.lang.Exception

internalFinally

protected void internalFinally(T2 runContext)
Specified by:
internalFinally in class AbstractTestRunner<T extends TestRunnable,T2 extends WsdlTestRunContext>

runSetupScripts

protected void runSetupScripts(T2 runContext)
                        throws java.lang.Exception
Throws:
java.lang.Exception

runTearDownScripts

protected void runTearDownScripts(T2 runContext)
                           throws java.lang.Exception
Throws:
java.lang.Exception

clear

protected void clear(T2 runContext)

fillInTestRunnableListeners

protected void fillInTestRunnableListeners()

runTestStepByName

public TestStepResult runTestStepByName(java.lang.String name)
Description copied from interface: TestCaseRunner
Runs the specified TestStep and returns the result

Specified by:
runTestStepByName in interface TestCaseRunner

runTestStep

public TestStepResult runTestStep(TestStep testStep)

runTestStep

public TestStepResult runTestStep(TestStep testStep,
                                  boolean discard,
                                  boolean process)

notifyAfterRun

protected void notifyAfterRun()

notifyBeforeRun

protected void notifyBeforeRun()

getTestCase

public abstract WsdlTestCase getTestCase()
Description copied from interface: TestCaseRunner
Gets the TestCase being run

Specified by:
getTestCase in interface TestCaseRunner
Returns:
the TestCase being run

getTimeTaken

public long getTimeTaken()
Description copied from interface: TestRunner
Returns the time taken by this runner since its last start

Specified by:
getTimeTaken in interface TestRunner
Overrides:
getTimeTaken in class AbstractTestRunner<T extends TestRunnable,T2 extends WsdlTestRunContext>

getResults

public java.util.List<TestStepResult> getResults()
Description copied from interface: TestCaseRunner
Gets the accumulated results so far; each TestStep returns a TestStepResult when running.

Specified by:
getResults in interface TestCaseRunner
Returns:
the accumulated results so far

setResultCount

public void setResultCount(int resultCount)

getResultCount

public int getResultCount()

gotoStep

public void gotoStep(int index)
Description copied from interface: TestCaseRunner
Transfers execution of this TestRunner to the TestStep with the specified index in the TestCase

Specified by:
gotoStep in interface TestCaseRunner

enforceMaxResults

public void enforceMaxResults(long maxResults)

gotoStepByName

public void gotoStepByName(java.lang.String stepName)
Description copied from interface: TestCaseRunner
Transfers execution of this TestRunner to the TestStep with the specified name in the TestCase

Specified by:
gotoStepByName in interface TestCaseRunner


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