Software Testing Automation Framework for FIX Protocol

Software Testing Automation Framework for FIX Protocol (STAFF) is a set of tasks, functions and methods, built on top of 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:

  • create a session with user defined parameters, start and stop it;
  • send messages of defined structure to the session
  • expect messages from the session, verify message structure, specific tags and/or their values
  • convert and save sent/received messages, use them for re-sending
  • store values ​​of certain tags, convert and re-use them  (for example, save tag Symbol of NewOrderSingle (D) and use it in ExecutionReport (8))

Each testing script is a user-defined sequence of instructions and commands written into the XML file which are 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 a powerful tool for operating with files and services, accessing database etc.

  • Easy to create and manage test cases and environments
  • XML-based test scripts
  • Ability to utilize Actions from previous run or add new ones (user-defined, built-in or third-party ones found in the web)
  • Possibility to run tests in different environments without modification using configuration file
  • Extendible set of supported actions:
    • Create FIX Acceptor
    • Create FIX Initiator
    • Send FIX message of the specified structure with specific tag values
    • Validate received messages
    • Validate data stored to DB
  • Support of FIX Protocol 4.0-5.0SP2 with any custom extensions
 
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 FIX session to be established
  • fixDisconnectExpect - starts disconnect event by indicating time point when disconnect event is expected (to be used in conjunction with fixDisconnectValidate task)
  • fixDisconnectValidate -  checks disconnect signal (if arrived) or wait time left from timeout
  • fixField - reads FIX tags (FIX repeating groups are also supported
  • fixSend - sends FIX message(s) to selected session
  • fixReceive - receives FIX message(s) from a session. Message verification (FIX tags and repeating groups) is supported
  • setControlLevel - switches between receiving of Application and Session level messages
  • fixSequenceReset  - sends Sequence Reset message in reset mode to the FIX Peer
  • fixLimit - used to assure that FIX message does not appear during 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

In order to write new test user needs to:

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

Sample of New Order Single test script

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