Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Table of context






Introduction

Installation

Use of Detroubulator

Configure the test.xml file

Use and create inputdocuments

XPATH test assertions

Running Detroubulator




Introduction





Unit testing your mapping programs is an important part of SAP XI development. However, unit testing manually in the Integration Builder is a time-consuming and error-prone task. Furthermore, it's a task that must, in an ideal world at least, be done every time a change is made to the mapping program. Detroubulator lets you write your unit tests once and for all and run them at the press of a button. This document describes a compete walkthrough about Detroubulator




Author: Luc Hermans

Company: Uphantis

Created on: November 10, 2006




Installation





Normally the installation of Detroubulator is a hell of a job. To make things less complex, I created an install program so now it’s possible to easily install Detroubulator.


1) Install Detroubulator.msi. You can download it from: Here!



Do only install to c:\program files\detroubulator otherwise it does not work!!


!https://weblogs.sdn.sap.com/weblogs/images/251742888/Installatie_file.JPG|height=58|alt=image|width=...!


2) Install Java Runtime Version 5.0

You can install this from the menu programs – Detroubulator


!https://weblogs.sdn.sap.com/weblogs/images/251742888/Java_Runtime_5.JPG|height=400|alt=image|width=4...!



Use of Detroubulator





Before you actual can use Detroubulator there are three important things you have to understand:


1) Understanding how to configured the test.xml file

2) Understanding how to use and create inputdocuments

3) Understanding how to Program XPATH test assertions





Configure the test.xml file





The test.xml file is used to make a connection with the XI Server and test Message Mappings. The test file is separated into 4 elements. Those 4 elements are described below and can be configured from the menu after you installed Detroubulator.msi






Element 1







Element 2







Element 3







Element 4






2) Go to sxbm_moni





3) Go to the pipeline of your XML message





4) Open the payload of your message





5) Export the payload to c:\program files\detroubulator\bin


a. Override the existing testcase1.xml or





XPATH test assertions




You have to know XPATH programming to create assertions that will be tested by Detroubulator. In this Walkthrough only the assertions that are used in this test case will be explained. For a XPATH tutorial visit the w3schools website by clicking

here!






/* = select from the root node

/klantnaam = select the element klantnaam

@orderregel = select the attribute orderregel

Count = Returns the count of nodes in this statement: returns the count of attribuut orderregel





Running Detroubulator





When you have configured the test.xml file and created an inputdocument you can run Detroubulator.



1) Click on Run detroubulator.bat to start Detroubulator.





2) Enter the password from your user account.





3) The test report (testreport.xml from c:\program files\bin\) will automatically been shown after you pressed any key from the console








15 Comments