Finance ISO protocol

The Finance ISO protocol enables you to create a Vuser script to monitor financial transactions using the ISO-8583 standard.

Version support: The Finance ISO protocol is supported from version 24.3.

About the Finance ISO protocol

The ISO-8583 standard defines a message format and communication flow for financial transactions. The messages are used by financial institutions and payment processors when exchanging electronic transactions.

The Finance ISO protocol enables you to write Vuser scripts to monitor messages that follow the standard specifications defined by ISO-8583. This is achieved by interacting with the server sending and receiving the messages. When you run tests with your Finance ISO scripts, they collect specific metrics for the message exchange between server and client.

To learn which ISO versions are supported by the Finance ISO protocol, see Supported Protocols. In addition, the protocol can support a custom message that uses ISO-8583 standard definitions.

The protocol uses the jPOS 2.1.9 library for specific message interaction.

Coding

The Finance ISO protocol supports scripting in Java, using standard Java conventions. All standard Java methods are available for scripts, and all APIs that are available for the Java Vuser protocol are also supported for the Finance ISO protocol.

In addition, VuGen provides specific entities and APIs for Finance ISO scripts. Most of these functions are methods of the LrJposChannel, LrISOMsg, and ISOUtility classes.

For API details, see Finance ISO functions in the Function Reference.

Timeout

The jPOS library does not include a timeout to limit the time a channel waits for a response, so it is possible that an API call can run indefinitely. If this happens, the script/scenario cannot be stopped in the usual way:

  1. Controller tries to stop the Vusers, and waits for them until the Controller timeout limit runs out.

  2. The Failed to stop error is displayed, and Vugen becomes unresponsive.

  3. Some javaw processes might remain open on the machine, and you need to close them manually before starting another script/scenario.

To avoid this issue, it is recommended to specify a timeout as a parameter in your script. You can set the timeout overload in the LrJposChannel.receive and LrJposChannel.getBytes APIs.

Back to top

ISO channels

Channels are responsible for sending and receiving messages. jPOS uses the channel to implement wire protocol details for the messages.

The custom channel used by Finance ISO protocol scripts is ot.protocols.financeISO.LrJposChannel. This is based on jPOS channel implementation, and supports jPOS channel types (apart from LoopbackChannel).

The channel type is determined when initializing LrJposChannel, by defining the LrJposChannel.ChannelType parameter. The LrJposChannel must be initialized for each Vuser before sending or receiving any message.

Note: The LrJposChannel APIs are all static methods, so each Vuser can have only one LrJposChannel type initialized at a time. A Vuser cannot have multiple channels open simultaneously.

Supported channel types

AmexChannel GZIPChannel PostChannel
ASCIIChannel HEXChannel RawChannel

BASE24Channel

LogChannel RBPChannel

BASE24TCPChannel

NACChannel TelnetXMLChannel
BCDChannel FSDChannel VAPChannel

CSChannel

NCCChannel X25Channel
GICCChannel PADChannel XMLChannel

Back to top

ISO packagers

Packagers are the entities that pack and unpack ISO messages, and are attached to the channel. The jPOS library has many packagers implemented, and they are available for use with the Finance ISO protocol.

Users can also use their own packagers defined by .xml files when instantiating org.jpos.iso.packager. GenericPackager.

In addition, the Finance ISO protocol has two dedicated implementations for packagers, adhering to the ISO-8583 2003 standard:

  • AsciiPackager2003. This packager is based on configuration file ISO2003Ascii.xml that is located inside the installation/lib folder.

    This file can be used as-is in scripts. Its full path is received when calling the getAsciiConfigFilePathForPackager2003 API.

  • BinaryPackager2003. This packager is based on configuration file ISO2003Binary.xml that is located inside the installation/lib folder.

    This file can be used as-is in scripts. Its full path is received when calling the getBinaryConfigFilePathForPackager2003 API.

For details on calling these packages, see Finance ISO utility functions in the Function Reference.

Back to top

Create and edit Finance ISO scripts

When you create a new Finance ISO script, the import lrapi.lr class is already inserted into the script template. The template also includes the package for the LoadRunner-specific classes, and some of the most used packages from the jPOS library.

Note: A Finance ISO script runs as a scalable multi-threaded application. Make sure that any code you include is thread-safe. For details, see Java protocol programming tips.

To create or edit a Finance ISO script:

  1. Prerequisite: Make sure your Java environment is set up. For details, see Set up the environment for Java protocols.

  2. In VuGen, open a Finance ISO script.

  3. Place all your code in the Actions class that is displayed when you open the script in VuGen. The Actions class contains three methods: init, action, and end. For details, see Java Vuser protocol.

    You initialize the LrJposChannel using the Finance ISO APIs. Best practices is to initialize it in the init method and close it in the end method.

    Examples:

    Copy code
    public int init() throws Throwable {
            AsciiPackager2003 pack = new AsciiPackager2003();
            LrJposChannel.initChannel(LrJposChannel.ChannelType.ASCIIChannel, "localhost", 8000, pack);
            return 0;
        }
    Copy code
    public int end() throws Throwable {
            LrJposChannel.closeChannel();
            return 0;
     }
  4. Insert your Java code into the script in the relevant methods.
  5. Enhance your script with rendezvous points, transactions, output messages, and other elements. For details, see Enhance a Java script.

Back to top

See also: