Testing Documents

This chapter provides an overview of document testing and discusses how to:

Click to jump to parent topicUnderstanding Testing Documents

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.

Click to jump to parent topicAccessing the Document Tester Utility

The Document Tester utility page (IB_LOGICALTESTER) is located in the IB_LOGICALTESTER component.

You can access the Document Tester utility page two ways:

The following example shows the Document Tester page:

Click to jump to parent topicEntering Element Test Values

This section discusses how to:

Click to jump to top of pageClick to jump to parent topicEntering Test Values for Primitive Elements

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:

  1. Access the Document Tester (PeopleTools, Documents, Document Utilities, Document Tester).

  2. Click the name of a primitive element for which to enter a test value.

    The Set Value page appears.

  3. In the Long field, enter a test value.

  4. Click the OK button.

Click to jump to top of pageClick to jump to parent topicAppending and Deleting Collection Element Items

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:

  1. Access the Document Tester (PeopleTools, Documents, Document Utilities, Document Tester).

  2. Click the name of a collection element.

    The Collection Actions - Select an Action page appears.

  3. Select Append Collection Item.

  4. 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:

  1. Access the Document Tester (PeopleTools, Documents, Document Utilities, Document Tester).

  2. Click the name of a collection element.

    The Collection Actions - Select an Action page appears.

  3. Select Delete Last Collection Item.

  4. Click the OK button.

The Document Tester page appears, and the last row in the collection is deleted.

Click to jump to parent topicGenerating and Viewing Test Documents

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:

  1. Access the Document Tester page (PeopleTools, Documents, Document Utilities, Document Tester).

  2. Enter any optional test values and actions as described elsewhere in this chapter.

  3. 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.

  4. 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.

Click to jump to parent topicClearing Document Tester Utility Data

This section discuses how to:

Click to jump to top of pageClick to jump to parent topicClearing Document Tester Output

To clear generated test output, for example, generated XML, click the Clear button at the bottom of the Document Tester utility page.

Click to jump to top of pageClick to jump to parent topicClearing Test Values and Actions

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:

Clearing Collection Element Actions

To clear collection element actions: