Oracle Waveset 8.1.1 Deployment Guide

Example 1: Using the Default DataProvider to Run Compatibility Tests

This example illustrates how to run compatibility tests on a SimulatedResourceAdapter using the default DataProvider.

Prepare the Test

Use the following steps to prepare the compatibility tests.

ProcedureTo Prepare the Test

  1. Set up the following files:

    sample/compat/example.1/example.properties

    sample/compat/example.1/SimulatedCompatibilityConfig.xml


    Note –

    The default path to the simulated resource in SimulatedCompatibilityConfig is /tmp/mySimulatedResource.xml.

    You can edit this path if you want to specify a different location.


  2. Before executing the example, copy ant-junit.jar from Apache ant 1.6.5 to your $WSHOME/WEB-INF/lib directory.

Execute the Test

Use the following steps to execute the compatibility tests.

ProcedureTo Execute the Compatibility Test

  1. Open a command window.

  2. At the prompt, type

    cd $WSHOME

    bin/lh com.sun.idm.testing.adapter.CompatibilitySuite -propsFile sample/compat/example.1/example.properties

    Your output should look similar to the following example:


    TestSuite: com.sun.idm.testing.adapter.CompatibilitySuite
    Starting internal database server ...
    DB Server @ jdbc:hsqldb:hsql://127.0.0.1:57022/idm
    Importing file sample/compat/example.1/SimulatedCompatibilityConfig.xml
    ’Create(com.sun.idm.testing.adapter.compatibility.Create)’ skipped  (unknown)
    ’Authenticate(com.sun.idm.testing.adapter.compatibility.AuthenticateUser)’ skipped  (unknown)
    ’DeleteExisting(com.sun.idm.testing.adapter.compatibility.DeleteExisting)’ skipped  (unknown)
    ’UpdateExisting(com.sun.idm.testing.adapter.compatibility.UpdateExisting)’ skipped  (unknown)
    ’RenameExisting(com.sun.idm.testing.adapter.compatibility.RenameExisting)’ skipped  (unknown)
    ’EnableExisting(com.sun.idm.testing.adapter.compatibility.EnableExisting)’ skipped  (unknown)
    ’DisableExisting(com.sun.idm.testing.adapter.compatibility.DisableExisting)’ skipped  (unknown)
    ’Iterate(com.sun.idm.testing.adapter.compatibility.Iterate)’ skipped  (unknown)
    ’DeleteMissing(com.sun.idm.testing.adapter.compatibility.DeleteMissing)’ passed  (77 ms)
    
    Tests run: 9, failures: 0, errors: 0, skipped: 8, Time elapsed: 10864 ms

What Happened

In Execute the Test, the lh command runs the compatibility test with the following argument:

-propsFile sample/compat/example.1/example.properties

Both the adapter and ns properties are required to run the test.

Execute the Test also uses the import property, which imports a list of files into the repository. The import property is similar to lh import filename.

When you start the compatibility test, the tester retrieves the adapter and ns properties from the specified properties.

The default DataProvider retrieves data from the extension element of a namespace#TestData configuration object, which in this example was SimulatedCompatibilityConfig#TestData.


Note –

If you do not specify a DataProvider when setting up a test, Waveset used the default DataProvider.


The DataProvider retrieves this SimulatedCompatibilityConfig#TestData configuration object from the repository.

To get the configuration object into the repository, you must define the object in the following file, which is specified in the import property:

sample/compat/example.1/SimulatedCompatibilityConfig.xml

To simplify configuration in Execute the Test, only one test was run with the includedTests=DeleteMissing parameter.


Note –

See the Javadoc for more information about which parameters are available and which parameters are required for the different tests.