This chapter discusses:
Uses for automated integration point testing.
The processes for automated integration point testing.
Tools used for automated integration point testing.
Setting up systems for automated integration point testing.
Recording service operation transactions.
Playing back service operation transactions.
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:
Service operations.
Component interfaces.
Flat files.
Staging tables.
The automated integration point testing process entails:
Recording service operation transactions.
Exporting service operation transactions.
Playing back service operation transactions.
Managing testing results.
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.
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.
You can use automated integration point testing for the following levels of testing:
Unit testing during integration point development.
Cross-application business process testing.
Regression 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:
Build integration points prior to cross-business business-process testing.
Generate test data for the integration point test process.
Use the integration point test automation tools to test the integration point.
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.
Validate dependent processes by running a process that depends on the data being integrated.
Submit ‘bad’ service operation transactions to test error handling.
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:
Set up multiple product lines in one test environment.
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.
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.
Consolidate service operation transaction data into a test repository for later use.
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:
Play back service operation transactions recorded during testing to test integration points.
Run dependent processes to validate results.
This section describes tools that are used in automated integration point testing.
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.
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
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. |
ig.EIPOutputDirectory |
Indicates the directory to store request and response files during recording. The default value is c:\temp\output. |
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
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:
Requesting node.
Destination node.
Service operation name.
XPaths to fields in the request to be used as the unique key.
Leave this blank to use the entire contents as the hash key.
Description.
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>
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
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>
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. |
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.
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.
Set the following properties in the EIPTestTool Properties section in 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
Set loop back to False. To do so, remove the comment from the following line:
ig.EIPLoopBack=True
Change the parameter value to False.
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.
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
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>
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:
Inbound playback
Outbound playback
To perform inbound playback:
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
Purge all service operation transaction data in the system or the data that is specific to the integration point test.
Create and run a Send Master project of type EIP Testing (EIP Batch) for each service operation transaction type that you want to test.
Run the message export process on the response directory populated during testing.
Compare the transaction data returned by the export process to the data that is stored in the integration point test data repository.
See Also
Message Export Command Line Tool
To perform outbound playback:
Set the following properties in the EIPTestTool Properties section in 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
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.
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=
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.
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
Launch the necessary processes on the source system to invoke integration points with the target system.
Run the message export process on the log output directory used during testing to pull back the transaction data for use in data comparison.
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.
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