This chapter provides an overview of document testing and discusses how to:
Access the Document Tester utility.
Enter element test values.
Generate and view test documents.
Clear Document Tester utility data.
PeopleSoft provides a Document Tester utility that enables you to test the physical format of documents outside of runtime.
The utility provides you the option of entering sample data values for primitive elements, as well as appending or deleting rows in collection elements. You can clear test values and actions at anytime, and assign new test values and actions and regenerate the test document.
Note. You can generate test documents with or without entering test data values or performing append and delete actions.
You can then generate the physical document, and the system verifies if the format is valid and if it can be parsed. In addition, the system displays the generated document for you to view.
Note. Currently, XML is the only physical format generated by the PeopleSoft system.
The Document Tester also provides a link to the Document Builder, should you need to make changes to a document as a result of testing it.
The Document Tester utility page (IB_LOGICALTESTER) is located in the IB_LOGICALTESTER component.
You can access the Document Tester utility page two ways:
From the Document Tester link in the Document Builder (PeopleTools, Documents, Document Builder).
Select PeopleTools, Documents, Document Utilities, Document Tester.
The following example shows the Document Tester page:
This section discusses how to:
Enter test values for primitive elements.
Append and delete collection element items.
The Document Tester utility enables you to enter test values for primitive elements.
When you select a primitive element in the document tree, a Set Value page (IB_LSTESTER_SEC) appears where you can set a test value for the element. The following example shows the Set Value page:
The Element Name field displays the element name with which you're working. The Primitive Type field and Field Length field display the data type and length as defined for the element in the Document Builder.
The name of the field where you enter a test value depends on the data type. In the previous example, the data type is a string, and therefore the system prompts you to enter a Long value. The following table lists the possible labels for the field where you enter a test value:
Data Type |
Primitive Type Field Label |
Test Value Field Label |
Binary |
Bin |
Long |
Boolean |
Bool |
Page displays a check box. |
Character |
Character |
Char |
Date |
Date |
Date |
DateTime |
DT |
Datetime |
Decimal |
Dec |
Numeric |
Integer |
Int |
Numeric |
String |
String |
Long |
Text |
Text |
Long |
Time |
Time |
Time |
The data type and field length that display are those that are defined for the document in the Document Builder.
After you enter test values, each value appears next to the corresponding element in the document tree on the main Document Tester page. The following example shows the appearance of the document tree for the ShipTo document after test values have been entered:
To enter test values for primitive elements:
Access the Document Tester (PeopleTools, Documents, Document Utilities, Document Tester).
Click the name of a primitive element for which to enter a test value.
The Set Value page appears.
In the Long field, enter a test value.
Click the OK button.
You can append a collection item with a copy of the last row in the collection or delete the last row in a collection.
To accomplish either task, use the Collection Actions - Select an Action page (IB_LSTESTER2_SEC). When you click the name of a collection element in the document tree, the Collection Actions - Select an Action page appears. The following example shows the page:
The system displays properties for the element, such as minimum occurs, unbound maximum, and required, as defined for the document in the Document Builder.
Appending Collection Elements
To append a collection element with a copy of the last row in the collection:
Access the Document Tester (PeopleTools, Documents, Document Utilities, Document Tester).
Click the name of a collection element.
The Collection Actions - Select an Action page appears.
Select Append Collection Item.
Click the OK button.
The Document Tester page appears, and the collection element is appended with a copy of the last row in the collection.
Deleting Collection Elements
To delete a collection row:
Access the Document Tester (PeopleTools, Documents, Document Utilities, Document Tester).
Click the name of a collection element.
The Collection Actions - Select an Action page appears.
Select Delete Last Collection Item.
Click the OK button.
The Document Tester page appears, and the last row in the collection is deleted.
When you generate a test document in the Document Tester, the generated XML appears on the right side of the Document Tester page.
The following example shows an XML document generated for the ShipTo document:
When you view the output you'll note that no test values were specified for the primitive elements.
The following example shows test output generated for the ShipTo document using specified test values:
To generate and view test documents:
Access the Document Tester page (PeopleTools, Documents, Document Utilities, Document Tester).
Enter any optional test values and actions as described elsewhere in this chapter.
From the Physical Format Type drop-down list box, select the document format to generate.
XML is the default format and is currently the only physical format available to generate.
Click the Generate button at the bottom of the page.
The test document in the physical format selected appears on the right side of the page.
This section discuses how to:
Clear Document Tester output.
Clear test values and actions.
To clear generated test output, for example, generated XML, click the Clear button at the bottom of the Document Tester utility page.
This section discusses how to clear primitive element test values and collection element actions.
Clearing Primitive Element Test Values
To clear primitive element test values:
To clear one or several values, click an element in the document tree to open the Set Value page. Manually clear the value.
To clear all test values, exit the Document Tester and reopen it.
Clearing Collection Element Actions
To clear collection element actions:
To clear an appended collection element, click the element in the document tree to open the Select an Action page. Select Delete Last Collection Item.
To add back a deleted collection element, click the element in the document tree to open the Select an Action page. Select Append Collection Item.
To clear all test actions, exit the Document Tester and reopen it.