Using Automated Integration Point Testing

This chapter discusses:

Click to jump to parent topicUnderstanding Automated Integration Point Testing

PeopleSoft provides a means for automated integration point testing. You can perform automated integration point testing as a means to unit test, perform cross-application business process testing, or regression test integration points.

Automated integration point testing is suitable for testing integration points between PeopleSoft systems, PeopleSoft systems and third-party systems, and PeopleSoft systems and open interfaces.

You can use automated integration point testing with the following PeopleSoft integration technologies:

Click to jump to top of pageClick to jump to parent topicProcess Overview

The automated integration point testing process entails:

  1. Recording service operation transactions.

  2. Exporting service operation transactions.

  3. Playing back service operation transactions.

  4. Managing testing results.

Recording Service Operations

When you use integration point test automation, PeopleSoft Integration Broker records service operation details as they traverse between PeopleSoft applications, as well as between PeopleSoft and third-party applications. This enables you to test integration when these systems are not available, and then play back the service operations at a later time to mimic integrating with the systems.

For synchronous transactions, PeopleSoft Integration Broker saves request and response service operation transactions as flat files, one file per service operation transaction, in an integration point repository. For asynchronous transactions, PeopleSoft Integration Broker only saves requests.

Exporting Service Operations

PeopleSoft Integration Broker provides an export process that persists recorded request and response data as files to disk. After you export files, you can add them to your integration point certification repository.

To carry out the export process, you use the Message Export command line tool.

Playing Back Service Operations

Service operation transaction playback consists of outbound and inbound playback.

Outbound playback refers to testing from the source system when the target is not available. Inbound playback refers to testing the target system when the source is not available. In either case, you can use Send Master or the Batch Project Executor to act at the source system.

Managing Testing Results

The integration point test tool writes service operation transactions as files in directories to an integration point test data repository. After testing is complete, these directories of service operation transaction data need to be managed in a repository for subsequent use.

Click to jump to top of pageClick to jump to parent topicUses for Automated Integration Point Testing

You can use automated integration point testing for the following levels of testing:

Unit Testing Integration Points

Unit testing occurs during integration point development, prior to cross-application business process testing. The components of an integration point that you can test include sending service operations, handlers, transformations, and content-based routing logic. You can also test business logic in a component that will behave differently when accessed from a component interface than when accessed through a PeopleSoft Pure Internet Architecture page.

The process for unit testing integration points is:

  1. Build integration points prior to cross-business business-process testing.

  2. Generate test data for the integration point test process.

  3. Use the integration point test automation tools to test the integration point.

  4. Validate results by reviewing the Service Operations Monitor for both inbound and outbound service operation transactions. You can further verify inbound playback results by viewing the tables involved in the integration.

  5. Validate dependent processes by running a process that depends on the data being integrated.

  6. Submit ‘bad’ service operation transactions to test error handling.

  7. Submit service operation transactions in bulk to volume test the integration point.

Cross-Application Business Process Testing

Business process testing involves testing integration points in one application against a target application and version for which it was designed. As an example, you could test integration points between two PeopleSoft applications.

The steps for cross-application business-process testing are:

  1. Set up multiple product lines in one test environment.

  2. Manually enter data on PeopleSoft Pure Internet Architecture pages, or use an automated tool for doing so.

    PeopleSoft Integration Broker records the integration point service operation transactions.

  3. Run dependent processes on each side to validate the data.

    Note. For full synchronous service operations testing, running dependent processes might not be practical, due to the large number of transactions involved. You can open the table records to verify that the data that you expect is present, or use an automated database table compare tool.

  4. Consolidate service operation transaction data into a test repository for later use.

Regression Testing

Regression occurs after cross-application business process testing. You can minimize the need for regression testing by requiring users to test their code changes with the data captured during testing. This enables you to test published interfaces in other applications against changes to integration points in the application.

The process for regression testing is:

Click to jump to parent topicUnderstanding Tools Used in Automated Integration Point Testing

This section describes tools that are used in automated integration point testing.

Click to jump to top of pageClick to jump to parent topicIntegration Point Data Repository

PeopleSoft Integration Broker builds the following integration point test data repository structure during the export process.

You specify the top-level directory for the repository in the integration gateway properties file using the ig.EIPInputDirectory property.

Warning! Do not alter this directory structure. This structure is required for outbound playback. If you alter this structure, PeopleSoft Integration Broker cannot locate response files.

Integration point test data repository structure

The following graphic shows what the structure might look like in Microsoft Windows Explorer using actual data.

Click to jump to top of pageClick to jump to parent topicEIP Gateway Manager

When a synchronous request is received during testing, the gateway manager performs a lookup in the cached data gathered from the integration point test service operation transaction property file. If the system finds a match is found, the request XPaths are traversed to build the appropriate hash that can then be used to locate the corresponding response located within the integration point certification repository. The system loads the response file and passes it back to the requestor.

For asynchronous requests, the gateway manager generates an acknowledgement as the response and passes it back to the requestor.

In addition to returning the appropriate response files during outbound playback, the gateway manager logs request and response files. When the appropriate flag is set in the integration gateway properties file, the gateway manager logs the files into the defined output directory. Response and request file have the following naming convention.

<time stamp>.<request or response>

For example:

220030519T150406.832.request

Click to jump to top of pageClick to jump to parent topicIntegration Gateway Properties File

The integration gateway properties file contains an EIPTestTool Properties section, in which you set the following information for integration point test automation:

Property

Description

ig.gatewayManagerClass=com.peoplesoft.pt.

integrationgateway.eiptesttool.EIPTestTool

GatewayManager

Indicates the class name of the gateway manager to use during processing.

ig.EIPLoopBack

Determines if the integration gateway should be in record or playback mode.

Set this property equal to True for outbound playback, and set it equal to False for recording.

The default value is True.

The only valid values for this property are True and False. Any other value specified for this property will be ignored by the system.

ig.EIPOutputDirectory

Indicates the directory to store request and response files during recording. The default value is c:\temp\output.

You must set this property for recording service operation transactions.

Setting this property is optional for playback.

ig.EIPMsgProp.count

Indicates the number of integration point test service operation transaction properties files that are in use for test automation. The default value is 0 (zero).

ig.EIPInputDirectory

Indicates the location of the integration point test data repository that stores request and response data. The default value is c:\temp\input.

ig.EIPMsgProp.N.propFile

Indicates the name and location of an integration point service operation transaction properties file.

N denotes the index number for this property. The index starts at 1 and incrementally advances to the number specified by the ig.EIPMsgProp.count property.

ig.EIPMsgProp.N.inputDirectory

Indicates the input directory path for request or response data in situations for which an integration point service operation transaction property file uses a directory structure other than the default certification directory.

Use this property to override the ig.EIPInputDirectory property.

ig.EIPNodeMap

Indicates the location and name of the node map file to use during outbound playback (“loop back”) testing.

Note. All file paths in the integration gateway property file for EIP test tools must use backslashes in the file path.

See Also

Using the integrationGateway.properties File

Click to jump to top of pageClick to jump to parent topicIntegration Point Test Service Operation Transaction Properties File

Integration point test service operation transaction property files are XML files that contain synchronous integration point definitions broken down by product or sub-product. These files are used during message export and outbound playback.

Note. Integration point test service operation transaction properties files are required for synchronous service operation transactions only.

One integration point test service operation transaction properties file must exist for each product line or sub-product.

Integration point testing metadata is not contained in a single file, because it does not scale well and because this information needs to be cached and accessed quickly.

Each integration point entry is keyed by requesting node, destination node, and service operation.version.

You specify the location of the file in the integration gateway properties file using the ig.EIPMsgProp.N.propFile property.

The integration point test service operation transaction properties file contains the following properties for synchronous integration points:

The following example shows the contents of a sample integration point test service operation transaction properties file.

<?xml version="1.0"?> <eips> <eip messagename="QE_SALES_ORDER_SYNC.VERSION_1" destinationnode="QE_LOCAL"> <descr> <![CDATA[Outbound Synchronous QE_SALES_ORDER_SYNC from QE_LOCAL⇒ to QE_IBTGT]]> </descr> <xpath>MsgData/Transaction/QE_SALES_ORDER/QE_ACCT_ID</xpath> </eip> </eips>

Click to jump to top of pageClick to jump to parent topicSend Master

The Send Master utility features an EIP Testing (Batch EIP) project type that enables you to test batches of MIME messages from a directory, and also allows you to test different transaction values.

In addition to using the Send Master graphical user interface, you can also initiate automated testing through a Batch Project Executor command line tool.

See Also

Using EIP Testing Projects

Click to jump to top of pageClick to jump to parent topicMessage Export Command Line Tool

The Message Export command line tool is a batch file that extracts transaction data from request and response data, and creates a hierarchical structure of source, service operation, and destination directories in the integration point test data repository.

The Message Export command line tool is located in the PeopleSoft web server domain: MessageExport.bat.

Usage

The standard usage of the Message Export tool is:

MessageExport [-options]

Classpath

The classpath for the Message Export is created in the MessageExport.bat file during installation.

Syntax

The syntax for using the Message Export tool is:

MessageExport ​-in "C:/temp/input" ​-out "C:/temp/output" ​-eip "c:\temp\eip\eip_prop\eip_crossnode_sync.xml" ​-result "C:/temp/output/result.txt"

Note. Use forward slashes in the directory path structure.

Parameters

The Message Export parameters that you can pass are described in the following table.

Parameter

Description

-in

Indicates the input directory, used during recording, that contains all of the request and response files generated from the EIP gateway manager.

-out

Indicates the location of the directory for the integration point test data repository.

-eip

Indicates the list of integration point service operation transaction property files, separated by semicolons.

This parameter is not required for asynchronous integration points.

-result

Indicates the name of the file that contains the results of the export process. The contents of this file is represented as XML.

-ow

(Optional.) Overwrites files if they already exist.

-cd

(Optional.) Creates the output directory if PeopleSoft Integration Broker does not find it.

-rn

(Optional.) Specifies the requesting node. You can specify one value only.

All other requesting node values in the input directory will be ignored.

-dn

(Optional.) Specifies the destination node. You can specify one value only.

All other destination node values in the input directory will be ignored.

-mn

(Optional.) Specifies the service operation name, including version. You can specify one value only.

The system ignores all other service operation names in the input directory.

For releases prior to PeopleTools 8.48 this is the message name.

-mv

(Optional.) This parameter is only used with PeopleTools releases prior to PeopleTools 8.48.

Specifies the message version for the message name that you specified. You can specify one value only.

The system ignores all other message versions for the selected message name in the input directory.

-? -help

(Optional.) Displays the Help menu.

Output

If an export is successful, the contents of the output file resembles the following contents.

<?xml version="1.0"?> <success> <file path="C:\TEMP\eip\export_in\20051128T041615.545.request" rawfilepath="C:\TEMP\eip\export_out\QE_LOCAL\QE_SALES_ORDER_SYNC. VERSION_1\V999\QE_IBTGT\20051128T041615.545_48.request" success="true" transdatafilepath="C:\TEMP\eip\export_out\QE_LOCAL\ QE_SALES_ORDER_SYNC.VERSION_1\V999\QE_IBTGT\request\1.xml"/> <file path="C:\TEMP\eip\export_in\20051128T041615.545.response" rawfilepath="C:\TEMP\eip\export_out\QE_LOCAL\QE_SALES_ORDER_SYNC. VERSION_1\V999\QE_IBTGT\20051128T041615.545_48.response" success="true" transdatafilepath="C:\TEMP\eip\export_out\QE_LOCAL\ QE_SALES_ORDER_SYNC.VERSION_1\V999\QE_IBTGT\response\1.xml"/> </success>

If an export is not successful, the contents of the output file resembles the following contents:

<?xml version="1.0"?> <failure> <![CDATA[Invalid output directory: C:\Documents and Settings\Jfranco\ Desktop\export]]> </failure>

Click to jump to top of pageClick to jump to parent topicHash Key Generator Command Line Tool

When you use the Message Export tool, PeopleSoft Integration Broker generates unique request and response pairs, and creates a unique hash key ID for the generated pair. The hash key is used by the integration gateway during playback to ensure that proper correlation occurs between the request and response files.

If you bypass the export process and manually add files for testing, or if you carry out testing when the target or source systems are not available to properly record information, you must generate a hash key. The Hash Key Generator is a command line tool that enables you to generate a hash key.

The Message Export command line tool is located in the PeopleSoft web server domain: HashKeyGenerator.bat.

Usage

The standard usage for the Hash Key Generator is:

HashKeyGenerator [-options]

Syntax

The syntax for using the Hash Key Generator is:

HashKeyGenerator ​-in "C:\temp\input.txt HashKeyGenerator ​-v 214 "John Doe" PeopleSoft HaskKeyGenerator ​-v Sally 1234 ​-t

Parameters

The Hash Key Generator parameters you can pass are described in the following table.

Parameter

Description

-in

Indicates the file name to be used as the hash value. When working with non-XML files, the entire value must be hashed.

-t

Prepends a timestamp value to the returned hash value. will prepend a timestamp value.

-v

Indicates values to use as the hash key. When the system encounters this parameter, PeopleSoft Integration Broker uses all values specified in the hash key until it encounters the next “-” option.

-? -help

(Optional.) Displays the Help menu.

Click to jump to top of pageClick to jump to parent topicNode Map Properties File

A Node Map properties file is an XML file that enables you to associate renamed or custom node names with actual shipped application node names. This enables you to use unique node names during testing.

The system uses this file during outbound playback.

You create this file and specify the shipped application node names and all custom node names in use for a specific node. You must specify the file name and location in the integration gateway properties file, using the ig.EIPNodeMap property.

The following example shows a node map properties file.

<?xml version="1.0"?> <nodemap> ​<map name="PSFT_HR"><node name="HRTST01"/><node name="HRTST02"/><node name="HRTST03"/> </map> <map name="PSFT_CRM"> <node name="CRMTST01"/> <node name="CRMTST02"/> <node name="CRMTST03"/> </map> </nodemap>

In the highlighted portion of the example, the map name PSFT_HR corresponds to a delivered application node. The node names HRTST01, HRTST02 and HRTST03 correspond to custom nodes names that are in use.

Click to jump to parent topicRecording Service Operation Transactions

To record service operation transactions and to allow PeopleSoft Integration Broker to capture the exact structure of each integration point as they pass between the systems, you must ensure that all PeopleSoft systems involved in the integration are configured and running.

  1. Set the following properties in the EIPTestTool Properties section in the integration gateway properties file:

    1. Set the gateway manager class to EIP Gateway Manager. To do so, remove the comment from the following line:

      ig.gatewayManagerClass=com.peoplesoft.pt.integrationgateway.eiptesttool. EIPTestToolGatewayManager

    2. Set loop back to False. To do so, remove the comment from the following line:

      ig.EIPLoopBack=True

      Change the parameter value to False.

    3. Set the log output directory. To do so, remove the comment from the following line:

      ig.EIPOutputDirectory=c:\temp\output

      You can change the directory location as appropriate.

    4. For synchronous service operation transactions, define the number of integration point test service operation transaction properties in use for the test, and specify the necessary number of entries for the integration point test service operation transaction properties file. To do so, remove the comment from the following line:

      ig.EIPMsgProp.count

      Set this property equal to the number of integration point test service operation transaction properties files in use for the test. For example:

      ig.EIPMsgProp.count=3

      You must also specify the location of the integration point test service operation transaction properties files for each file directory in use for testing. The number of files that you specify should equal the value that you specified for the ig.EIPMsgProp.count property.

      To specify the integration point test service operation transaction files for the test, remove the comment from the following line:

      ig.EIPMsgPropN.propFile

      Enter the name and location of each integration point test service operation transaction properties file in use for the test.

      For example:

      ig.EIPMsgProp1.propFile=c:\temp\File_1.xml

  2. Launch the necessary processes on the source system to invoke integration points with the target system.

To verify that recording took place, navigate to the log output directory that you specified in the previous step. The persisted request and response files use the following naming conventions.

<time stamp>.<request> <time stamp>.<response>

Click to jump to parent topicPlaying Back Service Operation Transactions

Playing back service operation transactions enables you to continue service operation transaction testing as if the external system is operational.

Inbound service operation transaction playback enables you to simulate inbound asynchronous and synchronous service operation transaction processing. Outbound playback enables you to simulate outbound asynchronous and synchronous service operation transaction processing.

This section describes how to perform:

Click to jump to top of pageClick to jump to parent topicInbound Playback

To perform inbound playback:

  1. In the EIPTestTool properties section of the integration gateway properties file, set the gateway manager class to EIP Gateway Manager. To do so, remove the comment from the following line:

    ig.gatewayManagerClass=com.peoplesoft.pt.integrationgateway.eiptesttool. EIPTestToolGatewayManager

  2. Purge all service operation transaction data in the system or the data that is specific to the integration point test.

  3. Create and run a Send Master project of type EIP Testing (EIP Batch) for each service operation transaction type that you want to test.

  4. Run the message export process on the response directory populated during testing.

  5. Compare the transaction data returned by the export process to the data that is stored in the integration point test data repository.

See Also

Using EIP Testing Projects

Message Export Command Line Tool

Click to jump to top of pageClick to jump to parent topicOutbound Playback

To perform outbound playback:

  1. Set the following properties in the EIPTestTool Properties section in the integration gateway properties file:

    1. Set the gateway manager class to EIP Gateway Manager: to do so, remove the comment from the following line:

      ig.gatewayManagerClass=com.peoplesoft.pt.integrationgateway.eiptesttool. EIPTestToolGatewayManager

    2. Set loop back to True; to do so, remove the comment from the following line:

      ig.EIPLoopBack=True

      Change the parameter value to True, if necessary.

    3. Set the location of the input file directory; to do so, remove the comment from the following line and set the value equal to the location of the directory.

      ig.EIPInputDirectory=

    4. (Optional.) Set the log output directory; to do so, remove the comment from the following line:

      ig.EIPOutputDirectory=c:/temp/output

      You can change the directory location as appropriate.

    5. For synchronous service operation transactions, define the number of integration point test service operation transaction properties in use for the test, and specify the necessary number of entries for the integration point test service operation transaction properties file; to do so, remove the comment from the following line:

      ig.EIPMsgProp.count

      Set this property equal to the number of integration point test service operation transaction properties files in use for the test. For example:

      ig.EIPMsgProp.count=1

      You must also specify the location of the integration point test service operation transaction properties files for each file directory in use for testing. The number of files that you specify should equal the value that you specified for the ig.EIPMsgProp.count property.

      To specify the integration point test service operation transaction files for the test, remove the comment from the following line:

      ig.EIPMsgPropN.propFile

      Enter the name and location of each integration point test service operation transaction properties file in use for the test.

      For example:

      ig.EIPMsgProp1.propFile=c:\temp\File_1.xml

  2. Launch the necessary processes on the source system to invoke integration points with the target system.

  3. Run the message export process on the log output directory used during testing to pull back the transaction data for use in data comparison.

  4. View the integration gateway logs or Service Operations Monitor to verify that the inbound requests are valid and that PeopleSoft Integration Broker sends the proper responses from the repository.

  5. Compare the transaction data returned by the export process to the data that is stored in the integration point test data repository to view expected versus actual results.

    You can accomplish this by manually reviewing the database tables or by using an automated database table compare tool.

See Also

Message Export Command Line Tool