|
TPTP 4.4.0 Testing Tools Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.hyades.automation.core.AbstractService
org.eclipse.hyades.automation.server.AbstractService
org.eclipse.hyades.automation.server.AbstractRelaunchableService
org.eclipse.hyades.automation.server.AbstractWorkspaceSensitiveService
org.eclipse.hyades.automation.server.AbstractProjectSensitiveService
org.eclipse.hyades.test.core.services.AbstractTestExecutionService
Abstract class that all test core execution related services should extend, common execution related methods and state are located in this class. The idea is that this class will define a template method with associated abstract or default implementation concrete methods that will be extended by the various test types and situations. It might very well be the case that the default is fine for most test types without having to extend this class. For the service properties, variables named specifiers indicate zero to one values whereas a selector is interpreted as a variable that can have zero to many values. The template method is the execute method and is marked final, for subclasses to participate as test execution services they must override the template method associate methods in a way to receive the desired results. The associated template methos are listed below and referenced in order that they are invoked, for the latest order please verify with the code in this classes' execute method. Note that the suite property takes either a string or a list of strings to specify the tests to execute and that the results property is also used as an list out value (a list of strings naming the results)
initialize(),
beforeLaunch(String),
launch(ILaunchConfiguration, String, IProgressMonitor),
afterLaunch(ILaunch),
#afterExecution(),
handleThrowable(Throwable),
cleanup(),
Auxiliary supporting associated template method methods:,
#waitForCompletion(ILaunch, int),
loadDeployment(IProject, String),
loadModelElement(IProject, String),
loadTestSuite(IProject, String),
getProgressMonitor(),
getWaitForCompletionInterval(),
createDerivedTestSuiteFile(IProject, String, boolean),
Serialized Form| Nested Class Summary |
|---|
| Nested classes inherited from class org.eclipse.hyades.automation.core.Service |
|---|
org.eclipse.hyades.automation.core.Service.Discoverable, org.eclipse.hyades.automation.core.Service.Executable, org.eclipse.hyades.automation.core.Service.Requestable |
| Field Summary | |
|---|---|
protected java.lang.String |
classpathSpecifier
The classpath specifier, if specified, specifies the classpath that will be prepended to any previously associated classpath with the test execution of interest. |
protected java.lang.String |
configurationSelector
The configuration selector, if specified, specifies the launch configuration to be used as the starting point for this test execution. |
protected java.lang.String |
connectionSpecifier
The connection specifier, if specified, shadows the previously associated and store connection-related state, this specifier can suggest scheme, server class, host, port and server instance. |
protected java.lang.String |
deploymentSelector
The deployment selector, if specified, identifies one to potentially many deployments involved in this test execution, the concrete service determines how to use the selector specified. |
protected boolean |
overwriteSpecifier
The overwrite specifier, indicates if results should be overwritten each time or if result names will be generated in order to preserve the original results and not overwrite them. |
protected java.lang.String |
resultProjectDir
Result string containing file system path to project for locating project relative result files in results member |
protected java.util.List |
results
Result list to return to callers of the service |
protected java.lang.String |
resultsSpecifier
The results specifier, if specified, indicates zero to one specified values for this the results, the concrete service determines how to use the specified value (used as input and not necessarily the concrete file names of the results) |
protected java.util.List |
suiteSelector
The test suite selector, if specified, identifies one to potentially many test suites involved in this test execution, the concrete service determines how to use the selector specified. |
| Fields inherited from class org.eclipse.hyades.automation.server.AbstractProjectSensitiveService |
|---|
project, projectSpecifier |
| Fields inherited from class org.eclipse.hyades.automation.server.AbstractWorkspaceSensitiveService |
|---|
workspace, workspaceSpecifier |
| Constructor Summary | |
|---|---|
protected |
AbstractTestExecutionService()
Default constructor invokes up hierarchy for any initialization required |
| Method Summary | |
|---|---|
protected org.eclipse.emf.ecore.EObject |
afterExecution(org.eclipse.debug.core.model.IProcess process)
Executed after the execution completion has been waited on and it is found to be complete. |
protected org.eclipse.debug.core.model.IProcess |
afterLaunch(org.eclipse.debug.core.ILaunch launch)
Invoke after the launch but before the execution is waited on and completed. |
protected org.eclipse.debug.core.ILaunchConfiguration |
beforeLaunch(java.lang.String suiteSpecifier)
Before the execution has launched but after the initialize method sets up, could be used to select the actual instance objects to use based on the various selector and specifier variables before a launch. |
protected void |
cleanup()
Before the execution will return, used in normal cases and exceptional cases. |
protected java.io.File |
createDerivedTestSuiteFile(org.eclipse.core.resources.IProject project,
java.lang.String sourceTestSuite,
boolean deleteOnExit)
Derives a new test suite model element and corresponding file representing it from a source test suite, retrieved by file identifier (test suite project relative name or absolute path) |
java.lang.Object |
execute()
|
protected org.eclipse.debug.core.model.IProcess |
getProcessOfInterest(org.eclipse.debug.core.ILaunch launch)
Retrieve process of interest from launch, the test execution process |
protected org.eclipse.core.runtime.IProgressMonitor |
getProgressMonitor()
The default method creates and offers a null progress monitor, overwrite this to create a custom progress monitor |
protected int |
getWaitForCompletionInterval()
The time to wait before polling the test execution process for its completion status. |
protected void |
handleThrowable(java.lang.Throwable t)
Default outputs throwable to standard console out |
protected void |
initialize()
Invoked at the beginning before any other template method, used to initialize instance variable state and any other actions that are required before anything else is begun. |
protected org.eclipse.debug.core.ILaunch |
launch(org.eclipse.debug.core.ILaunchConfiguration configuration,
java.lang.String mode,
org.eclipse.core.runtime.IProgressMonitor monitor)
Launches a given configuration, using the specified mode (typically ILaunchManager.RUN_MODE) and an optional progress monitor. |
protected org.eclipse.hyades.models.common.testprofile.TPFDeployment |
loadDeployment(org.eclipse.core.resources.IProject project,
java.lang.String deploymentName)
Load deployment model element given the project and deployment name |
protected org.eclipse.hyades.models.common.common.CMNNamedElement |
loadModelElement(org.eclipse.core.resources.IProject project,
java.lang.String modelElementName)
Loads a model element, given a project and model element name |
protected org.eclipse.hyades.models.common.testprofile.TPFTestSuite |
loadTestSuite(org.eclipse.core.resources.IProject project,
java.lang.String testSuiteName)
Load test suite model element given the project and test suite name |
protected java.lang.Object |
returnResult()
The result to return from this service |
protected void |
waitForCompletion(org.eclipse.debug.core.model.IProcess process,
int interval)
Waits for the test to be fully complete, then returns |
| Methods inherited from class org.eclipse.hyades.automation.server.AbstractProjectSensitiveService |
|---|
getProject, refreshProject |
| Methods inherited from class org.eclipse.hyades.automation.server.AbstractRelaunchableService |
|---|
copy, reconstructCommandLine |
| Methods inherited from class org.eclipse.hyades.automation.server.AbstractService |
|---|
execute |
| Methods inherited from class org.eclipse.hyades.automation.core.AbstractService |
|---|
configure, configure, createMemento, getIdentifier, getProperties, getProperty, getProperty, getPublicProperties, getRoot, isQuiet, print, println, println, setMemento, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String classpathSpecifier
protected java.lang.String configurationSelector
protected java.lang.String connectionSpecifier
protected java.lang.String deploymentSelector
protected java.util.List results
protected java.lang.String resultProjectDir
protected boolean overwriteSpecifier
protected java.lang.String resultsSpecifier
protected java.util.List suiteSelector
| Constructor Detail |
protected AbstractTestExecutionService()
| Method Detail |
protected org.eclipse.emf.ecore.EObject afterExecution(org.eclipse.debug.core.model.IProcess process)
protected org.eclipse.debug.core.model.IProcess afterLaunch(org.eclipse.debug.core.ILaunch launch)
protected org.eclipse.debug.core.ILaunchConfiguration beforeLaunch(java.lang.String suiteSpecifier)
throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreExceptionprotected void cleanup()
protected java.io.File createDerivedTestSuiteFile(org.eclipse.core.resources.IProject project,
java.lang.String sourceTestSuite,
boolean deleteOnExit)
throws java.io.IOException
project - the project of interestsourceTestSuite - the source test suite the created suite is deriving fromdeleteOnExit - indicates if the derived test suite file representation should
be deleted on exit of the vm
java.io.IOExceptionpublic final java.lang.Object execute()
protected org.eclipse.debug.core.model.IProcess getProcessOfInterest(org.eclipse.debug.core.ILaunch launch)
launch - the launch associated with this test execution
protected org.eclipse.core.runtime.IProgressMonitor getProgressMonitor()
protected int getWaitForCompletionInterval()
protected void handleThrowable(java.lang.Throwable t)
t - the throwable caught to be handledprotected void initialize()
protected org.eclipse.debug.core.ILaunch launch(org.eclipse.debug.core.ILaunchConfiguration configuration,
java.lang.String mode,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.core.runtime.CoreException
configuration - the launch configuration to launchmode - the mode to launch inmonitor - ability to cancel and report status
org.eclipse.core.runtime.CoreException
protected org.eclipse.hyades.models.common.testprofile.TPFDeployment loadDeployment(org.eclipse.core.resources.IProject project,
java.lang.String deploymentName)
project - the project containing (or that should be containing) the
deploymentdeploymentName - the deployment identifier
protected org.eclipse.hyades.models.common.common.CMNNamedElement loadModelElement(org.eclipse.core.resources.IProject project,
java.lang.String modelElementName)
project - the project the model element is found inmodelElementName - the model element within the project to load
protected org.eclipse.hyades.models.common.testprofile.TPFTestSuite loadTestSuite(org.eclipse.core.resources.IProject project,
java.lang.String testSuiteName)
project - the project the test suite is contained in (or should be
contained in)testSuiteName - the test suite name identifying the test suite
protected java.lang.Object returnResult()
protected void waitForCompletion(org.eclipse.debug.core.model.IProcess process,
int interval)
interval - the amount of time to wait before checking time completion
status
|
TPTP 4.4.0 Testing Tools Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||