Sun Identity Manager Deployment Guide

Example 2: Adding More Data

To run the creation tests, and other tests that create users, you must add more data to the configuration object. In this next example, you must use the default DataProvider again and import an XML file.

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.2/example.properties

    sample/compat/example.2/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 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.2/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.2/SimulatedCompatibilityConfig.xml
    ’Authenticate(com.sun.idm.testing.adapter.compatibility.AuthenticateUser)’ skipped  (unknown)
    ’UpdateExisting(com.sun.idm.testing.adapter.compatibility.UpdateExisting)’ skipped  (unknown)
    ’RenameExisting(com.sun.idm.testing.adapter.compatibility.RenameExisting)’ skipped  (unknown)
    ’Iterate(com.sun.idm.testing.adapter.compatibility.Iterate)’ skipped  (unknown)
    ’DeleteMissing(com.sun.idm.testing.adapter.compatibility.DeleteMissing)’ passed  (15 ms)
    ’EnableExisting(com.sun.idm.testing.adapter.compatibility.EnableExisting)’ passed  (259 ms)
    ’DisableExisting(com.sun.idm.testing.adapter.compatibility.DisableExisting)’ passed  (7 ms)
    ’DeleteExisting(com.sun.idm.testing.adapter.compatibility.DeleteExisting)’ passed  (3 ms)
    ’Create(com.sun.idm.testing.adapter.compatibility.Create)’ passed  (3 ms)
    
    Tests run: 9, failures: 0, errors: 0, skipped: 4, Time elapsed: 10178 ms

What Happened

You requested additional tests by setting the following property in the properties file:

IncludedTests=DeleteMissing,Create,EnableExisting,DisableExisting,DeleteExisting

These tests required more data from the DataProvider.

To provide this new data, several changes were made to the configuration object specified by SimulatedCompatibilityConfig.xml.

The SimulatedCompatibilityConfig.xml file added a create attribute containing a username, password, and list of user attributes. The default DataProvider uses the create attribute when the compatibility tests ask for the username, password, and attributes required to create a single user.

The SimulatedCompatibilityConfig.xml file also added a schema map.