Preparing to test

All business object processing originates from the Java component of the connector. This applies to all business objects and all possible verbs. To unit test, IBM provides an ABAP program that simulates the connector's action of sending in a business object request.

Specifically, the program simulates the doVerbFor() processing in the Java component of the connector by calling the ABAP function module /CWLD/RFC_DO_VERB_NEXTGEN. Like doVerbFor(), the test program requires a business object as an input to pass to the ABAP function module. The ABAP test program uses a text file as its input.

All input test files have the same ASCII text format. From this file format, the test program restructures the data to resemble the business object passed to /CWLD/RFC_DO_VERB_NEXTGEN. The following rules apply to business object input files:

In addition to the test program, IBM also provides a program for generating the object test input file. The Test File Generator builds the test file based on one of several different inputs. Table 17 lists the Test File Generator options.

Table 17. Test file generator inputs and outputs
Option Required inputs Description of output
Dynamic Ret/Tran Table entries in:
  • /CWLD/WIZ_OUT (Dynamic Retrieve)
  • /CWLD/WIZ_IN (Dynamic Transaction)
A test input file containing either a complete set or subset of attributes based on their net use in both Dynamic Retrieve and Dynamic Transaction tables. This is Dynamic Retrieve and Dynamic Transaction metadata.
IDoc Structure An IDoc type defined in your SAP application A test input file containing one instance of every possible object (segment) and attribute (segment-field). This is an IDoc structure.
IDoc object
  • An ABAP function module developed to retrieve IBM WebSphere business objects
  • The object's key

A test input file with only the attributes (fields) and objects (segments) that exist for the particular object identified with the key. This is an IDoc object.
Repository Definition The same text file that used to load the repository (when WebSphere InterChange Server is the integration broker) or copied to the repository (when WebSphere WMQ Integrator Broker is the integration broker) A test input file containing one instance of every possible object and attribute. This is a repository definition.

Choosing to generate an IDoc object is useful because the Generate test file tool generates an input file that has valid attribute values, making it easier to test Create, Update, or Delete verbs because the values have been validated.

The other three options (Dynamic Ret/Tran, IDoc Structure, and CW Repository Definition) are similar because they provide input files with no attribute values.

Copyright IBM Corp. 2003, 2004