Software Testing Automation Framework for FIX Protocol (STAFF) is a set of tasks, functions, and methods built on top of an Apache cross-platform, Java-based tool called Ant, and developed for automated testing of FIX applications.

STAFF tasks allow performing various operations with FIX sessions and messages, such as:

  • creating a session with user defined parameters, starting and stopping it;
  • sending messages of defined structure to the session
  • expecting messages from the session, and verifying message structure, specific tags, and/or their values
  • converting and saving sent/received messages, and using them for re-sending
  • storing values ​​of certain tags, converting, and re-using them (for example, saving the tag Symbol of NewOrderSingle (D) and using it in ExecutionReport (8))

Each testing script is a user-defined sequence of instructions and commands written into the XML file that is consistently interpreted and executed. Tests are easily combined into suites; each test can be referenced from another one as a library and re-used in different suites.

Along with STAFF, all Ant libraries can be used as powerful tools for operating with files and services, accessing databases, etc.

Features

  • Easy to create and manage test cases and environments
  • XML-based test scripts
  • Ability to utilize Actions from previous runs or add new ones (user-defined, built-in or third-party ones found in the web)
  • Possibility to run tests in different environments without modifications using the configuration file
  • Extendible set of supported actions:
    • Create FIX Acceptor
    • Create FIX Initiator
    • Send FIX message with a specified structure and specific tag values
    • Validate received messages
    • Validate data stored to DB
  • Support of FIX Protocol 4.0-5.0SP2 with any custom extensions

STAFF Data Types and Tasks

List of Supported Data Types List of Supported Tasks
  • fixMessage - FIX message object
  • fixInitiator -  FIX initiator
  • fixAcceptor - FIX acceptor
  • smtpAcceptor - simple SMTP server
  • smtpMessage - SMTP message object.
  • fixStart - starts FIX initiator or acceptor
  • fixStop - stops FIX initiator or acceptor
  • fixWaitForLogin - waits for a FIX session to be established
  • fixDisconnectExpect - starts a disconnect event by indicating the time when a disconnect event is expected (to be used in conjunction with fixDisconnectValidate task)
  • fixDisconnectValidate -  checks disconnect signal (if arrived) or wait time left over from timeout
  • fixField - reads FIX tags (FIX repeating groups are also supported
  • fixSend - sends FIX message(s) to a selected session
  • fixReceive - receives FIX message(s) from a session. Message verification (FIX tags and repeating groups) is supported
  • setControlLevel - switches between receiving Application and Session level messages
  • fixSequenceReset  - sends a Sequence Reset message in reset mode to the FIX Peer
  • fixLimit - used to assure that a FIX message does not appear during a specified period of time
  • fixFilterFixIn -  intercepts incoming messages
  • fixFilterFixOut - intercepts outgoing messages
  • fixFilterRule  - rule of filter
  • smtpStart - starts SMTP acceptor
  • smtpStop - stops SMTP acceptor
  • smtpReceive - receives SMTP messages (message verification is supported)
  • sqlExt - represents connection to DB
  • verifyCell - verifies DB field value
  • Block - represents common FIX message fields

Test Script Examples

In order to write new a test, a user needs to:

  • Take a sample test script
  • Change session parameters (if necessary)
  • Add required commands to the test
  • Execute

Sample of New Order Single test script

If you have interest in exploring STAFF further, please contact us at sales@btobits.com