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:
Table 16. Attribute properties and values
Attribute Property | Description or Possible Values |
---|---|
Name | name of the attribute |
Value | value of the attribute or CxIgnore = 'CxIgnore'or CxBlank = ' ' |
IsKey | value that
specifies whether the attribute is a key: 0 = no 1 = yes |
Peers |
NumberOfPeers value expressed an integer that represents the total number of child business objects at the same level For example, if an Item business object contains two line items, each line item would have the value '2'. |
AppInfo | application-specific information that is specific to each business object |
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:
|
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 |
|
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 a WebSphere WMQ message 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.