Skip navigation links

Oracle BPEL Process Manager Client Java API Reference
10g Release 3 (10.1.3.1.0)

B28986-01


com.oracle.services.bpel.test
Interface ITestService

All Superinterfaces:
IService

public interface ITestService
extends IService

This service allows remote clients to launch BPEL tests and get the results of the tests.


Field Summary
static java.lang.String JSP_MODE_results
          Form parameter to use when starting a test run over HTTP.
static java.lang.String JSP_MODE_run
          Form parameter to use when starting a test run over HTTP.
static java.lang.String JSP_PARAM_MODE
          Form parameter to use when starting a test run over HTTP.
static java.lang.String JSP_PARAM_NUM_WORKERS
          Form parameter to use when starting a test run over HTTP.
static java.lang.String JSP_PARAM_PROCESS_NAME
          Form parameter to use when starting a test run over HTTP.
static java.lang.String JSP_PARAM_PROCESS_REVISION
          Form parameter to use when starting a test run over HTTP.
static java.lang.String JSP_PARAM_RUN_ID
          Form parameter to use when starting a test run over HTTP.
static java.lang.String JSP_PARAM_RUN_NAME
          Form parameter to use when starting a test run over HTTP.
static java.lang.String JSP_PARAM_TEST_SUITE
          Form parameter to use when starting a test run over HTTP.
static java.lang.String JSP_PARAM_TIMEOUT_IN_SECS
          Form parameter to use when starting a test run over HTTP.
static java.lang.String LOCAL_SERVICE_NAME
          Name of the test service.
static java.lang.String SERVICE_NAME
          Name of the test service.

 

Method Summary
 ITestRunResultsAccessor createTestRunResultsAccessor(IBPELProcessHandle handle)
          Create a new test run results accessor object.
 java.util.Map deployTests(IBPELProcessHandle process, java.io.InputStream is)
          Deploys test drivers for a particular process.
 byte[] generateIntegrationTestDrivers(IInstanceHandle completedInstance)
           
 java.lang.String generateUnitTestDriver(IInstanceHandle completedInstance)
          Generates a test driver from a completed instance.
 java.lang.String getTestRunResults(IBPELProcessHandle handle, java.lang.String runName, java.lang.String runId)
          Get the results of a past test run.
 java.util.List listSuites(IBPELProcessHandle handle)
          List all of the deployed test suites for a specified process.
 java.util.List listSuites(IBPELProcessHandle handle, java.lang.String[] suites)
          List the deployed test suites for a specified process.
 java.lang.String runSuites(IBPELProcessHandle handle, ITestResultsObserver resultsObserver, ITestCallHandler externalCallHandler, java.lang.String runName, java.lang.String runId, java.util.List suites, int numWorkers, long timeout)
          Runs a subset of tests in one or more suites.
 java.lang.String runSuites(IBPELProcessHandle handle, ITestResultsObserver resultsObserver, ITestCallHandler externalCallHandler, java.lang.String runName, java.lang.String runId, java.lang.String[] suites, int numWorkers, long timeout)
          Runs one or more test suites.
 java.lang.String runTest(IBPELProcessHandle handle, ITestCallHandler externalCallHandler, java.lang.String runName, java.lang.String runId, java.lang.String suiteName, java.lang.String testLocation)
          Runs a single test.
 void undeployAllTests(IBPELProcessHandle process)
          Undeploy all test cases for this process.
 java.util.List undeployTests(IBPELProcessHandle process, java.lang.String[][] tests)
          Undeploy test cases.

 

Methods inherited from interface com.oracle.bpel.client.IService
getName

 

Field Detail

JSP_PARAM_PROCESS_NAME

static final java.lang.String JSP_PARAM_PROCESS_NAME
Form parameter to use when starting a test run over HTTP.
See Also:
Constant Field Values

JSP_PARAM_PROCESS_REVISION

static final java.lang.String JSP_PARAM_PROCESS_REVISION
Form parameter to use when starting a test run over HTTP.
See Also:
Constant Field Values

JSP_PARAM_TEST_SUITE

static final java.lang.String JSP_PARAM_TEST_SUITE
Form parameter to use when starting a test run over HTTP.
See Also:
Constant Field Values

JSP_PARAM_RUN_NAME

static final java.lang.String JSP_PARAM_RUN_NAME
Form parameter to use when starting a test run over HTTP.
See Also:
Constant Field Values

JSP_PARAM_RUN_ID

static final java.lang.String JSP_PARAM_RUN_ID
Form parameter to use when starting a test run over HTTP.
See Also:
Constant Field Values

JSP_PARAM_NUM_WORKERS

static final java.lang.String JSP_PARAM_NUM_WORKERS
Form parameter to use when starting a test run over HTTP.
See Also:
Constant Field Values

JSP_PARAM_TIMEOUT_IN_SECS

static final java.lang.String JSP_PARAM_TIMEOUT_IN_SECS
Form parameter to use when starting a test run over HTTP.
See Also:
Constant Field Values

JSP_PARAM_MODE

static final java.lang.String JSP_PARAM_MODE
Form parameter to use when starting a test run over HTTP.
See Also:
Constant Field Values

JSP_MODE_run

static final java.lang.String JSP_MODE_run
Form parameter to use when starting a test run over HTTP.
See Also:
Constant Field Values

JSP_MODE_results

static final java.lang.String JSP_MODE_results
Form parameter to use when starting a test run over HTTP.
See Also:
Constant Field Values

SERVICE_NAME

static final java.lang.String SERVICE_NAME
Name of the test service. This name is used to lookup the service from a domain locator. Use this name when accessing the service remotely.
See Also:
Locator.lookupService(java.lang.String), Constant Field Values

LOCAL_SERVICE_NAME

static final java.lang.String LOCAL_SERVICE_NAME
Name of the test service. This name is used to lookup the service from a domain locator. Use this name when accessing the service locally.
See Also:
Locator.lookupService(java.lang.String), Constant Field Values

Method Detail

runTest

java.lang.String runTest(IBPELProcessHandle handle,
                         ITestCallHandler externalCallHandler,
                         java.lang.String runName,
                         java.lang.String runId,
                         java.lang.String suiteName,
                         java.lang.String testLocation)
                         throws ServerException
Runs a single test. This method runs the specified BPEL test and returns the result.
Parameters:
handle - The process handle.
externalCallHandler - The call handler. This object is invoked when a test requests an external action to take place. One can pass null if the test does not contain any such requests.
runName - A descriptor of the run. pass null to use a system generated name.
runId - A unique id of the run. pass null to use a system generated GUID.
suiteName - The name of the test's suite.
testLocation - The name of the test.
Returns:
A string representation of the XML results.
Throws:
ServerException

runSuites

java.lang.String runSuites(IBPELProcessHandle handle,
                           ITestResultsObserver resultsObserver,
                           ITestCallHandler externalCallHandler,
                           java.lang.String runName,
                           java.lang.String runId,
                           java.lang.String[] suites,
                           int numWorkers,
                           long timeout)
                           throws ServerException
Runs one or more test suites.
Parameters:
resultsObserver - An observer object that is notified whenever tests complete. Pass null if intermediate notifications are not required.
externalCallHandler - The call handler. This object is invoked when a test requests an external action to take place. One can pass null if the tests does not contain any such requests.
runName - A descriptor of the run. pass null to use a system generated name.
runId - A unique id of the run. pass null to use a system generated GUID.
suites - The name of the test suites to run.
numWorkers - The number of workers allocated to run tests. Effectively, this value limits the number of tests that can run concurrently.
timeout - The timeout for the test run specified in seconds.
Returns:
A string representation of the XML results.
Throws:
ServerException

runSuites

java.lang.String runSuites(IBPELProcessHandle handle,
                           ITestResultsObserver resultsObserver,
                           ITestCallHandler externalCallHandler,
                           java.lang.String runName,
                           java.lang.String runId,
                           java.util.List suites,
                           int numWorkers,
                           long timeout)
                           throws ServerException
Runs a subset of tests in one or more suites. Use this version to specify exactly which tests to run rather than simply running all tests in the specified suites.
Parameters:
resultsObserver - An observer object that is notified whenever tests complete. Pass null if intermediate notifications are not required.
externalCallHandler - The call handler. This object is invoked when a test requests an external action to take place. One can pass null if the tests does not contain any such requests.
runName - A descriptor of the run. pass null to use a system generated name.
runId - A unique id of the run. pass null to use a system generated GUID.
suites - A List of TestSuite objects. Only the suite name and test cases need to be set. The description, includes and messages may be left as null.
numWorkers - The number of workers allocated to run tests. Effectively, this value limits the number of tests that can run concurrently.
timeout - The timeout for the test run specified in seconds.
Returns:
A string representation of the XML results.
Throws:
ServerException

listSuites

java.util.List listSuites(IBPELProcessHandle handle)
                          throws ServerException
List all of the deployed test suites for a specified process.
Parameters:
handle - The process.
Returns:
a list of TestSuite objects.
Throws:
ServerException

listSuites

java.util.List listSuites(IBPELProcessHandle handle,
                          java.lang.String[] suites)
                          throws ServerException
List the deployed test suites for a specified process.
Parameters:
handle - The process.
suites - The list of suites to describe
Returns:
a list of TestSuite objects.
Throws:
ServerException

getTestRunResults

java.lang.String getTestRunResults(IBPELProcessHandle handle,
                                   java.lang.String runName,
                                   java.lang.String runId)
                                   throws ServerException
Get the results of a past test run.
Parameters:
handle - The process handle.
runName - The run name of the past test run.
runId - The run id of the past test run.
Returns:
A string represention of the XML test run results.
Throws:
ServerException

createTestRunResultsAccessor

ITestRunResultsAccessor createTestRunResultsAccessor(IBPELProcessHandle handle)
                                                     throws ServerException
Create a new test run results accessor object. This object provides several helper methods to access the results of a test run.
Parameters:
handle - The process handle.
Returns:
The accessor object.
Throws:
ServerException

generateUnitTestDriver

java.lang.String generateUnitTestDriver(IInstanceHandle completedInstance)
                                        throws ServerException
Generates a test driver from a completed instance. This method uses the audit trail of a completed instance to generate a test driver. The generated test driver contains the initiate section as well as partner emulations. No assertions or asynchronous event emulations are generated. Before using this method, ensure all "invoke" and "receive" activities in the process have the "name" attribute set and that the audit trail logging level was set to "development" when the specified instance was executed.
Parameters:
completedInstance - The completed instance. The audit trail logging level must have been set to "development" when this instance was executed.
Returns:
The test driver. Most likely this driver will be used as a baseline driver that other test cases will include.
Throws:
ServerException

generateIntegrationTestDrivers

byte[] generateIntegrationTestDrivers(IInstanceHandle completedInstance)
                                      throws ServerException
Throws:
ServerException

deployTests

java.util.Map deployTests(IBPELProcessHandle process,
                          java.io.InputStream is)
                          throws ServerException
Deploys test drivers for a particular process. The input stream argument should be a zipped file consisting of the test drivers. The zip file should be laid out with top level directories being the various suite names. Underneath each suite directory should be an 'includes' directory containing all the test imports, a 'messages' directory containing all messages, and the various test driver files. An example heirarchy follows:
 + suite1
 | + includes
 | | + baseline1.xml
 | | + baseline2.xml
 |     ...
 | + messages
 | | + message1.xml
 | | + message2.xml
 | |   ...
 | + test1.xml
 | + test2.xml
 |   ...
 + suite2
   ...
 
If one suite encounters errors during deployment, this does not prevent other suites without errors from being deployed successfully.
Parameters:
process - The process.
is - Stream of compressed (zipped) bytes making up the tests
Returns:
a mapping of suite name to deployment exceptions. If retVal.size() == 0 then all suites were deployed successfully.
Throws:
ServerException

undeployTests

java.util.List undeployTests(IBPELProcessHandle process,
                             java.lang.String[][] tests)
                             throws ServerException
Undeploy test cases. If all test cases in a suite are undeployed, then the suite is undeployed.
Parameters:
process - The BPEL Process.
tests - The test cases. tests[i][0] is the test suite of the ith test case and tests[i][1] is the location (name) of the test case.
Returns:
The remaining test suites
Throws:
ServerException - if an error occurs during processing.

undeployAllTests

void undeployAllTests(IBPELProcessHandle process)
                      throws ServerException
Undeploy all test cases for this process. Ther is no return value as no tests will be left after this method call.
Parameters:
process - The BPEL Process.
Throws:
ServerException - if an error occurs during processing.

Skip navigation links

Oracle BPEL Process Manager Client Java API Reference
10g Release 3 (10.1.3.1.0)

B28986-01


Copyright © 2006, Oracle. All rights reserved.