This topic covers the ISO 8583 Client tool, which allows for sending and receiving ISO 8583 messages over a variety of channels and message packaging configurations.

Sections include:

Understanding the ISO 8583 Client Tool

ISO 8583 is a standard for systems that exchange electronic financial transactions made by cardholders using payment cards. However, certain challenges arise when testing the ISO 8583 standard:

  • Consistency: There are many variations and local implementations of ISO 8583.
  • Maintainability: Existing business-critical, payment-related systems are evolving and need to be maintained and tested.

Parasoft SOAtest provides a comprehensive testing framework that alleviates these challenges and allows you to establish a consistent, modern way to manage quality for ISO 8583-based systems, making the standard a part of the overall SOA/IT quality governance initiatives. You can also leverage SOAtest's productivity framework (such as data sources, test suites, rich data validation, etc.), and build a continuous regression testing infrastructure to evolve your electronic payment systems safely.

The Parasoft SOAtest ISO 8583 tool provides an easy-to-use GUI for use on an obscure, binary message format. You can use the ISO 8583 tool to:

  • Simulate clients (e.g. card acquires) for sending and receiving ISO 8583 messages
  • Configure messages using a visual interface for message field configuration
  • Provide customizable message headers
  • Create regression tests for ISO 8583-based systems with rich and flexible data validation
  • Chain ISO 8583 tests into multi-step scenarios to exercise complex financial transactions
  • Easily configure, send and receive any structured, fixed length binary messages that are not necessarily based on ISO 8583

Configuring the ISO 8583 Tool

Tool options can be configured in the ISO 8583 tool configuration panel, which can be accessed by double-clicking the tool node in the Test Case Explorer.

Tool Settings tab

In the Tool Settings tab, you can configure the following basic tool settings:

  • Name: Specifies the name of the tool.
  • Host and Port: Specifies the target system to which the messages are sent.
  • Message Exchange Pattern: Expect Synchronous Response: Specifies whether or not SOAtest receives a response. If Expect Synchronous Response is selected, SOAtest sends a message and receives a response.  If Expect Synchronous Response is not selected, SOAtest sends a one-way message and does not receive a response.

  • Connection Settings: Specifies Keep-Alive or Close connections for the transport protocol selected.
    • Keep-Alive connection: If selected, the TCP connection will be left opened by the current test so it can be reused by subsequent ISO 8583 Tool tests configured with the same host and port. For example, the subsequent test would reuse the same socket connection.
    • Close connection (default): If selected, then the subsequent test will open a new TCP connection (new socket).
  • Message Type (MTI) Selector: Specifies message type indicator values to accept or ignore—enabling you to fine-tune the messages that the tool processes (e.g., to filter out system messages). Use the text field to indicate the specific MTI(s) or MTI ranges you want accepted or ignored. For example, you might want to ignore only 0800, or specify a range such as 0100-0199.
  • Message Fields: Specifies ISO 8583 message field packaging. The available options are based on configurations provided by jPOS (www.jpos.org). Each configuration establishes the field Ids that are allowed in the message, and what data types and lengths they should have.
    • Selecting Custom from the drop-down menu will enable you to browse to a packager file that is designed to describe your specific message configuration. Custom packagers are jPOS-based XML files. For examples of such packager files, please refer to www.jpos.org. At the time of this writing, various XML packagers configurations can be found at http://jpos.svn.sourceforge.net/viewvc/jpos/trunk/jpos6/modules/jpos/cfg/packager/.
  • Transport Channel: Determines the protocol configuration of how messages are sent and received. These options influence how ISO 8583 message headers and trailers are handled, how overall message length values are sent and received, and possibly other factors. There are several channel options available to choose from based on channels that are available in jPOS  (www.jpos.org) and other common configurations.
    • Selecting Custom from the drop-down menu allows you to provide your own channel implementation. Custom results in the text field next to the drop-down menu are enabled and a fully qualified class name can be specified. A custom channel class needs to implement the interface org.jpos.ISOChannel or extend org.jpos.BaseChannel. Examples of channel implementations can be found at http://jpos.svn.sourceforge.net/viewvc/jpos/trunk/jpos6/modules/jpos/src/org/jpos/iso/channel/.

    • Once such a custom channel class is written, it needs to be added to the SOAtest classpath. For more information on how to add jars to the SOAtest classpath, see System Properties Settings.

  • Scripting Hook: Allows for custom manipulation of the ISO 8583 message before it is sent. Methods used in the scripting hook expect three parameters in the following order: ISOMsg, ISOChannel and Context. Scripting hook scripts execute after the ISOMsg object has been initialized with the content provided in the Input area of the ISO 8583 tool, and before the message is sent. For Javadocs and related jPOS classes, please refer to http://jpos.org/doc/javadoc/index.html

Input Type tab

In the Input Type tab, you can configure the ISO 8583 message (in the Message sub-tab), as well as any optional headers (in the Headers tab).

Message Sub-Tab

The following options can be configured in the Message tab:

  • Input Mode: The Form ISO 8583 view is an alternative (and the preferred) GUI for configuring the request messages (Literal XML and Form XML views are available as well). In the Form ISO 8583 view, new fields can be added with the Add button. Select one or more fields (hold CTRL while selecting multiple fields) and click Remove in order to remove the selected fields. When a single field is selected, it can be dragged as well.
    The order of fields when declared in any of the Message views does not influence how the fields are actually sent. Fields are always sent in ascending order based on the numeric field ID. This is consistent with the ISO 8583 message specification. However, order can be a factored when scripting is used in terms of what values are initialized first. For more details, please see Scripting ISO 8583 Header and Message Fields.

    The following options are available in the Form ISO 8583 view:

    • Field ID: Enter a numeric value. Only values that have been declared by the message field configuration (or packager file) are allowed. However, it is possible to declare more fields in the packager than the ones actually used.
    • Value: When clicking on a specific field value area, you can select between Fixed or Script. Parameterized is also an available option when a data source is visible from the test.
    • Type: Allows the choice between String and Binary. When it is set as Binary, it indicates that the value contains the literal hexadecimal representation of the content where every two hex digits represent a single byte. String indicates that the value should be interpreted based on the type specified in the message packager for that particular field (the Message Field Configuration).
    • Description: (Optional) Allows you to specify a description of the message for clarity. This option does not affect the sent message in any way.
    • Use Data Source: Exclude with empty string: (Only visible when a data source is available). When the check box in this cell is selected, you may map the value to a data source column. As the test executes and iterates over the data source rows, it will either include or exclude the specified ISO field based on whether the data source row at that column is empty. Whenever the data source value is empty, the field will be excluded. This feature is very useful in creating regression tests that iterate over many test cases using a data source, and where some test cases have certain ISO fields while others don't. So this effectively makes the inclusion of fields dynamic based on the data source.
  • Literal XML and Form XML views allow for ISO 8583 messages to be provided in an XML format. The actual message on the wire is sent in a binary format (not XML) unless jPOS XML Channel and XML packager are selected. The XML representation of the message is defined as follows:

    <isomsg>
    	<header>{Hexadecimal representation binary content}</header> 
    	<field id="{INTEGER}" value="{STRING}" [type="binary"]/>+
    </isomsg>


    So and example message can look similar to:

    <isomsg>
    	<header>16380c18601860a186b01868fff486e0bb21</header>  
    <field id="0" value="0100"/>
    <field id="2" value="5048993400009931"/>
    <field id="3" value="031000"/> 
    ...
    	<field id="128" value="0D0F030D040C0602" type="binary"/>
    </isomsg>

     

     

    • The type attribute is optional and when its value is set as “binary”, it indicates that the value attribute contains that literal hexadecimal representation of the content whereby every two hex digits represent a single byte. Omitting the type attribute results in the value being interpreted based on the type specified in the message packager for that particular field (the Message Field Configuration). Form XML allows for data source parameterization when a data source is present.

Header Sub-Tab

The Header tab can be used to configure a custom binary header for the ISO 8583 message. Header fields can rearranged (with drag and drop), and new fields can be added and removed with the corresponding buttons. Select multiple fields while holding CTRL in order to remove several fields at once. The overall size shown next to the buttons is the sum of all field sizes.

The following options can be configured in the Headers tab:

  • Name: Specifies the name of the header.
  • Value: When clicking on a specific field value area, you can select between Fixed or Script. Parameterized is also an available option when a data source is visible from the test.
  • Type: Specifies the data type for the header field. The available types influence how the content in the value cell is to be sent over the wire. The Binary (hex) option indicates that the value cell has a hex representation of the raw binary content and should be sent as is. The hex representation assumes two hexadecimal digits for every byte.
  • Size: Indicates the size of the field.
  • Exclusion: (Only visible when a data source is available). When the check box in this cell is selected, you may map the value to a data source column. As the test executes and iterates over the data source rows, it will either include or exclude the specified ISO field based on whether the data source row at that column is empty. Whenever the data source value is empty, the field will be excluded. This feature is very useful in creating regression tests that iterate over many test cases using a data source, and where some test cases have certain ISO fields while others don't. So this effectively makes the inclusion of fields dynamic based on the data source.

Viewing Traffic

When an ISO 8583 test is executed, the traffic viewer will display an XML representation of the messages sent and received. This representation is intended for making analysis easier; it does not reflect the actual byte stream on the wire. A hexadecimal dump of the message, exactly as it was captured at the socket level, is displayed in the Header section of the Traffic Viewer.

Extracting Values for Reuse Across Tests and Creating Regression Controls

Once ISO 8583 messaging scenarios are setup, regression controls or various value validation features can be applied to the response messages.

To apply a regression control, complete the following:

  • Right-click the ISO 8583 test and select Create/Update Regression Control from the shortcut menu. This results in a Diff tool being attached and capturing the ISO 8583 response in XML representation. You can also use the Add Output/Add Test tool bar button to chain other XML-based validation tools, or XML Data Bank to extract a value and use it in a subsequent test.

Scripting ISO 8583 Header and Message Fields

When Script is selected in a value cell, you may write custom code to generate the field value. Examples of such usage is to encrypt content or generate MAC values. 

The script methods will accept zero, one or two arguments. 

When a single argument is declared, it references the ISOMsg object representation of the current request ISO 8583 message. The ISOMsg object will have its fields initialized up to the current field. 

For example, if you are scripting the tenth field, then the ISOMsg object will set all prior 9 fields (if any) based with those field values. This is where rearranging ISO fields can make a difference—despite the fact that rearranging order does not influence the actual field order of the sent messages. When a second argument is declared, it will reference Context, which allows for accessing environment variables, data source values, etc. 

For more details, see the SOAtest Extensibility API documentation.You can access documentation for the Extension framework API via the Parasoft> Help menu (look for the book titled "Parasoft SOAtest Extensibility API").

  • No labels