Explaining the Architecture of the PIT Tool

Objective

After completing this lesson, you will be able to describe the architecture of the PIT tool

The PIT Tool: Introduction

The SAP Process Integration Test Tool (PIT) provides an environment allowing to set up automatic tests for existing Process Integration scenarios in the case of applying a new support package or migrating from a dual stack to a single stack system, and to reduce the business downtime.

A middleware such as SAP Process Orchestration is one of the core components of a customer's landscape. Since a downtime of SAP Process Orchestration has major impacts on nearly all business processes, the uptime of the integration platform is crucial.

You can reduce the technical downtime during a planned software update or upgrade by using the near Zero Downtime Maintenance (nZDM) approach. Whenever you apply a new patch or a new support package to your integration platform, you need to make sure that no regression was introduced and that your processes run as they did before the update. All in all, performing these checks via manual integration tests turns out to be very time consuming, and this process also leads to additional business downtime.

Another use case is the migration from SAP Process Integration to SAP Process Orchestration. In this case, even the configuration needs to be changed, which usually requires extensive testing of the business scenarios on the new integration landscape.

The SAP Process Integration Test Tool (PIT) addresses these use cases. It allows you to create test cases, collect data from your source system, and replay the test messages in your target system. Moreover, it compares the outcome of the test run with the expected result. You can set up test suites comprising multiple test cases and test data sets, and schedule the test suites for test automation.

The PIT Tool: Architectural Overview

The main idea is that successfully processed messages are extracted from the runtime of either an SAP Process Integration or a SAP Process Orchestration system (sources system). Those messages are stored in the PIT system’s data base and can later be replayed on a different system (target system). The replayed messages are gathered from the target system after the run. The results can be compared against the reference messages from the source.

The tool enables customers to test automatically with a well-defined set of reference messages, whether there are differences in the behavior of mapping functions, adapters and adapter modules, and routing, and so on.

With the PIT tool an integration developer can extract real, productive messages processed by his Process Integration (single or dual stack) source system, according to the specified configuration. The messages are stored in PIT as a reference test set together with some configuration information. They can therefore be reused later, even if the messages are not available in the source system anymore.

During the test execution, messages from the reference data set are injected into an AEX target system and are processed there by the standard XI pipeline in the adapter engine. The results of the test execution are collected by PIT and stored there as well. You can now compare whether the messages from the reference test set are equivalent to the ones processed within the test and verify whether the scenario works as expected.

Typically deviations between reference and test messages indicate a configuration mismatch between the source and the target system, if, for example, mappings, value mappings, or channel modules do not behave as expected. However, certain minor deviations can or even must be tolerated, for example, current date or current time in payloads or headers. With suitable test case exemptions, it is possible to ignore such differences during verification. The customer has to decide on whether deviations are tolerable or not.

The PIT tool also creates background jobs for test data extraction as well as test execution and verification. You configure the PIT Tool exclusively in the NWDS.

The Landscape to Use the Tool Consists Usually of Three Parts:

  • A source PI/PO/AEX system, from which data is extracted (source system).
  • A target PO/AEX system, into which data is injected (target system).
  • A PO/AEX system on which PIT is installed (PIT system).

Note

With SAP PO 7.50 SP21 an newer, it's possible to use the PIT Test tool on dual-usage type systems. However only Java-only scenarios (Integrated Configuration / Integration Flow) can be used as target scenarios for tests. Refer to note 3022858 for more details.

Note

Source systems can be dual stack or AEX systems, but only AEX systems are supported as target systems.

Note that at the time being, there's currently no possibility to protect sensitive data – make sure that this data is handled carefully.

Testing Strategies

Since SAP NetWeaver 7.5 SP20 the PIT tool supports two main testing strategies:

Since SAP NetWeaver 7.5 SP20 the PIT tool supports two main testing strategies:

  • Positive Testing
  • Negative Testing

Positive Testing

Positive testing is based on the assumption that a message, which was successful in the source system, is expected to be successful in the target system as well. A positive test checks that the content of a message such as payload, headers, and attachments are equivalent in the source and target systems. If the message execution fails in the target system, or if you encounter differences between the source and target systems, the test fails.

Negative Testing

But there also situations where you want to test that the system handles errors correctly. When a message fails in the source system, you expect to see the same error in the target system. This approach is know as negative testing. A negative test doesn’t compare the content of two messages, but only checks that the messages fail (with the same error). Consequently, a negative test is successful when a message fails, and the error expectation is fulfilled.

If you want to verify that the content of a message is equal in both the source and the target, use a positive test. If you want to check that the error handling for your source message is correct, use a negative test

Get Familiar with the Source Scenario

Business Scenario

You want to migrate Process Integration Scenarios from SAP Process Integration (SAP PI 7.4) to SAP Process Orchestration (SAP PO 7.5). Therefor you have to understand the source scenario.

Exercise Information

Note

In this exercise, when the values include ##, replace the character with a two-digit number (01–30).

Exercise Options

You can perform this exercise in two ways:

  1. Live Environment: choose Start Exercise, and from the entry page choose Open PDF Document. Follow the steps described in this pdf in your own system landscape.
  2. Simulation: choose Start Exercise, and from the entry page choose Start Tutorial. Watch the step-by-step instructions within the simulation.

Note

We recommend running the simulation first.

Task 1: Verify the Source Scenario

The source scenario already exists in RWP system (SAP PI 7.4). Verify the source scenario and create some test data.

Steps

  1. Open Integration Builder on RWP / 800.

    1. Open a browser of you choice, that is, Microsoft Internet Explorer, and open the URL http://rwptdc00.wdf.sap.corp:50000/dir.

    2. On the RWP: Process Integration Tools screen, choose Integration Builder.

    3. Log on with your user BIT500-## and your password.

      Note

      When opening the Swing client for the ESR or the ID, sometimes a pop-up Java Update Needed appears with a remark that your Java version is out of date. In that case, choose Later.
    4. A pop-up window, Do you want to run this application? appears. Choose Run.

      Note

      When opening the Swing client for the ESR or the ID, a Java security issue can appear. Get in touch with your instructor to solve this issue.
  2. Verify Receiver Determination BC_PIT_##_SND | SI_Material_outb.

    1. In the Configuration: Integration Builder (rwptdc00_RWP_00) window, in the Object tab, expand the Receiver Determination node in the menu.

    2. Double-click on BC_PIT_##_SND | SI_Material_oub to open the Receiver Determination. Note the following information:

      Field nameValue
      Sender Communication Component 
      Sender Interface 
      Sender Namespace 
    3. Choose Configuration Overview tab.

    4. Double-click on the Interface Determination BC_PIT_##_SND | SI_Material_outb | BC_PIT_##_RCV, and note the following information:

      Field nameValue
      Receiver Communication Component 
      Operation Mapping 
      Namespace 
    5. Close the Interface Determination.

    6. Go back to the Configuration Overview tab of the Receiver Determination.

    7. Double-click on the Receiver Agreement BC_PIT_##_SND | BC_PIT_##_RCV | SI_Materials_inb. Note the following information:

      Field nameValue
      Receiver Communication Channel 
    8. Close the Receiver Agreement.

    9. Go back to the Configuration Overview tab of the Receiver Determination.

    10. Double-click on the Receiver Communication Channel BC_PIT_##_RCV | CC_File_Receiver_##. Note the following information:

      Field nameValue
      Target Directory 
      File Name Schema 
    11. Close the Receiver Communication Channel.

Task 2: Create Some Test Messages

Steps

  1. Open Test environment on RWP, and send some test messages

    1. On the welcome screen of the PI system, choose Additional Information.

    2. If required, log on with your user BIT500-## and your password.

      Note

      In case you receive an error message 404, just refresh the page.
    3. Under Training Information choose Tools for BIT400.

    4. On the next screen Welcome to the homepage for BIT400 / TBIT40 training!, choose HTTP Client

    5. On the Client Http Adapter screen replace the ## by the group number, and choose Material.

    6. Replace the given SenderService with BC_PIT_##_SND.

    7. Choose Send several times to create a bunch of test messages.

      Note

      As all participants will use the same sender service, we will create a bunch of messages, which can be used in the PIT Test Case.
  2. Monitor the message in the PI 7.4, and check the file folder.

    1. On the welcome screen of the PI system, choose Configuration and Monitoring Home.

    2. Log on with your BIT500-## user and your password, if required.

    3. On the Monitoring tab, choose Integration EngineMessage Monitor.

    4. On the Message Monitor: Monitor Messages screen find your Sender Component BC_PIT_##_SND.

    5. In the column Successful, select the number.

    6. On the Database tab, you will see your messages with status Delivered.

    7. Open the group share folder for system RWP.

      Note

      You will find a detailed description of the mount process in Exercise 1, Task 1, Step 6.
    8. Open the folder group##.

    9. You will find a bunch of messages Material_<yyyymmdd-hhmmss-ms>.xml.

Log in to track your progress & complete quizzes