Test cases applicable to all FIX systems |
Ref ID |
Pre-condition |
Test case |
Mandatory/Optional |
Condition/Stimulus |
Expected Behavior |
2 |
|
Receive Message Standard Header |
Mandatory |
a. MsgSeqNum(34) received as expected |
Accept MsgSeqNum for the message |
b. MsgSeqNum(34) higher than expected |
Respond with Resend Request<2> message |
c. MsgSeqNum(34) lower than expected without PossDupFlag(43) set to Y
Exception: SeqReset-Reset
|
- Whenever possible it is recommended that FIX engine attempt to send a Logout message with a text message of "MsgSeqNum too low, expecting X but received Y"
- (optional) Wait for Logout message response (note likely will have inaccurate MsgSeqNum) or wait 2 seconds whichever comes first
- Disconnect
- Generate an "error" condition in test output
|
d. Garbled message received |
- Consider garbled and ignore message (do not increment inbound MsgSeqNum) and continue accepting messages
- Generate a "warning" condition in test output
|
e. PossDupFlag(43) set to Y; OrigSendingTime(122) specified is less than or equal to SendingTime(52) and MsgSeqNum(34)
lower than expected
Note: OrigSendingTime should be earlier than SendingTime unless the message is being resent within the same second during which it was sent
|
- Check to see if MsgSeqNum has already been received
- If already received then ignore the message, otherwise accept and process the message
|
f. PossDupFlag(43) set to Y; OrigSendingTime(122) specified is greater than SendingTime(52) and MsgSeqNum(34) as
expected
Note: OrigSendingTime should be earlier than SendingTime unless the message is being resent within the same second during which it was sent
|
- Send Reject<3> (session-level) message referencing inaccurate SendingTime (≥ FIX 4.2: SessionRejectReason(373) = 10 - "SendingTime accuracy
problem")
- Increment inbound MsgSeqNum
- Optional:
- Send Logout<5> message referencing inaccurate SendingTime value
- (optional) Wait for Logout<5> message response (note likely will have inaccurate SendingTime) or wait 2 seconds whichever comes first
- Disconnect
Generate an "error" condition in test output.
|
g. PossDupFlag(43) set to Y and OrigSendingTime(122) not specified
Note: Always set OrigSendingTime to the time when the message was originally sent-not the present SendingTime and set PossDupFlag = "Y" when responding to a Resend Request
|
- Send Reject<3> (session-level) message referencing missing OrigSendingTime(122) (≥ FIX 4.2: SessionRejectReason(373) =
1 - "Required tag missing")
- Increment inbound MsgSeqNum
|
h. BeginString(8) value received as expected and specified in testing profile and matches BeginString on outbound messages |
Accept BeginString for the message |
i. BeginString(8) value (e.g. "FIX.4.2") received did not match value expected and specified in testing profile or does not match BeginString on outbound messages |
- Send Logout<5> message referencing incorrect BeginString value
- (optional) Wait for Logout<5> message response (note likely will have incorrect BeginString) or wait 2 seconds whichever comes first
- Disconnect
- Generate an "error" condition in test output
|
j. SenderCompID(49) and TargetCompID(56) values received as expected and specified in testing profile |
Accept SenderCompID and TargetCompID for the message |
k. SenderCompID(49) and TargetCompID(56) values received did not match values expected and specified in testing profile |
- Send Reject<3> (session-level) message referencing invalid SenderCompID or TargetCompID (≥ FIX 4.2: SessionRejectReason(373) = 9 - "CompID
problem")
- Increment inbound MsgSeqNum(34)
- Send Logout<5> message referencing incorrect SenderCompID or TargetCompID value
- (optional) Wait for Logout<5> message response (note likely will have incorrect SenderCompID or TargetCompID) or wait 2 seconds whichever comes first
- Disconnect
- Generate an "error" condition in test output
|
l. BodyLength(9) value received is correct |
Accept BodyLength for the message |
m. BodyLength(9) value received is not correct. |
- Consider garbled and ignore message (do not increment inbound MsgSeqNum(34)) and continue accepting messages
- Generate a "warning" condition in test output
|
n. SendingTime(52) value received is specified in UTC (Universal Time Coordinated also known as GMT) and is within a reasonable time (e.g. 2 minutes) of atomic clock-based time |
Accept SendingTime for the message |
o. SendingTime(52 value received is either not specified in UTC (Universal Time Coordinated also known as GMT) or is not within a reasonable time (e.g. 2 minutes) of atomic clock-based
time.
Rationale: Verify system clocks on both sides are in sync and that SendingTime must be current time
|
- Send Reject<3> (session-level) message referencing inaccurate SendingTime (≥ FIX 4.2: SessionRejectReason(373) = 10 - "SendingTime accuracy
problem")
- Increment inbound MsgSeqNum(34)
- Send Logout<5> message referencing inaccurate SendingTime value
- (optional) Wait for Logout<5> message response (note likely will have inaccurate SendingTime) or wait 2 seconds whichever comes first
- Disconnect
- Generate an "error" condition in test output.
|
p. MsgType(35 value received is valid (defined in spec or classified as user-defined) |
Accept MsgType for the message |
q. MsgType(35) value received is not valid (defined in spec or classified as user-defined) |
- Send Reject<3> (session-level) message referencing invalid MsgType (≥ FIX 4.2: SessionRejectReason(373) = 11 - "Invalid MsgType")
- Increment inbound MsgSeqNum(34)
- Generate a "warning" condition in test output
|
r. MsgType(35) value received is valid (defined in spec or classified as user-defined) but not supported or registered in testing profile |
- If < FIX 4.2
- Send Reject<3> (session-level) message referencing valid but unsupported MsgType
- If ≥ FIX 4.2
- Send Business Message Reject<j> message referencing valid but unsupported MsgType (≥ FIX 4.2: BusinessRejectReason(380) =
3 - "Unsupported Message Type")
- Increment inbound MsgSeqNum(34)
- Generate a "warning" condition in test output
|
s. BeginString(8), BodyLength(9), and MsgType(35) are first three fields of message |
Accept the message |
t. BeginString(8), BodyLength(9), and MsgType(35) are not the first three fields of message |
- Consider garbled and ignore message (do not increment inbound MsgSeqNum(34)) and continue accepting messages
- Generate a "warning" condition in test output
|
3 |
|
Receive Message Standard Trailer |
Mandatory |
a. Valid CheckSum(10) |
Accept Message |
b. Invalid CheckSum(10) |
- Consider garbled and ignore message (do not increment inbound MsgSeqNum(34)) and continue accepting messages
- Generate a "warning" condition in test output
|
c. Garbled message |
- Consider garbled and ignore message (do not increment inbound MsgSeqNum(34)) and continue accepting messages
- Generate a "warning" condition in test output
|
d. CheckSum(10) is last field of message, value has length of 3, and is delimited by <SOH> |
Accept Message |
e. CheckSum(10) is not the last field of message, value does not have length of 3, or is not delimited by <SOH> |
- Consider garbled and ignore message (do not increment inbound MsgSeqNum(34)) and continue accepting messages
- Generate a "warning" condition in test output.
|
4 |
|
Send Heartbeat<0> message |
Mandatory |
a. No data sent during preset heartbeat interval (HeartBeatInt(108) field) |
Send Heartbeat message |
b. A Test Request<1> message is received |
Send Heartbeat<0> message with Test Request message's TestReqID(112) |
5 |
|
Receive Heartbeat<0> message |
Mandatory |
Valid Heartbeat<0> message |
Accept Heartbeat<0> message |
6 |
|
Send Test Request<1> |
Mandatory |
No data received during preset heartbeat interval (HeartBeatInt(108) field) + "some reasonable period of time" (use 20% of HeartBeatInt field) |
- Send Test Request message
- Track and verify that a Heartbeat<0> with the same TestReqID(112) is received (may not be the next message received)
|
7 |
|
Receive Reject<3> message |
Mandatory |
Valid Reject message |
- Increment inbound MsgSeqNum(34)
- Continue accepting messages
|
8 |
|
Receive Resend Request<2> message |
Mandatory |
Valid Resend Request |
Respond with application level messages and SequenceReset-Gap Fill<4> for admin messages in requested range according to "Message
Recovery" rules |
9 |
|
Synchronize sequence numbers |
Optional |
Application failure |
Send Sequence Reset - Reset<4> message or manually reset to 1 out-of-band |
10 |
|
Receive Sequence Reset (Gap Fill)<4> |
Mandatory |
a. Receive Sequence Reset (Gap Fill) message with NewSeqNo(36) > MsgSeqNum(34) and MsgSeqNum > than expect sequence number |
Issue Resend Request<2> to fill gap between last expected MsgSeqNum & received MsgSeqNum |
b. Receive Sequence Reset (Gap Fill)<4> message with NewSeqNo(36) > MsgSeqNum(34) and MsgSeqNum = to expected
sequence number |
Set next expected sequence number = NewSeqNo |
c. Receive Sequence Reset (Gap Fill)<4> message with NewSeqNo(36) > MsgSeqNum(34) and MsgSeqNum < than
expected sequence number and PossDupFlag(43) = "Y" |
Ignore message |
d. Receive Sequence Reset (Gap Fill)<4> message with NewSeqNo(36) > MsgSeqNum(34) and MsgSeqNum < than
expected sequence number and without PossDupFlag(43) = "Y" |
- If possible send a Logout<5> message with text of "MsgSeqNum too low, expecting X received Y", prior to disconnecting FIX session
- (optional) Wait for Logout message response (note likely will have inaccurate MsgSeqNum) or wait 2 seconds whichever comes first
- Disconnect
- Generate an "error" condition in test output
|
e. Receive Sequence Reset (Gap Fill)<4> message with NewSeqNo(36) ≤ MsgSeqNum(34) and MsgSeqNum = to expected
sequence number |
Send Reject<3> (session-level) message with message "attempt to lower sequnce number, invalid value NewSeqNum=<x>" |
11 |
|
Receive Sequence Reset (Reset)<4> |
Mandatory |
a. Receive Sequence Reset (reset) message with NewSeqNo(36) > than expected sequence number |
- Accept the Sequence Reset (Reset) message without regards to its MsgSeqNum(34)
- Set expected sequence number equal to NewSeqNo
|
b. Receive Sequence Reset (Reset)<4> message with NewSeqNo(36) = to expected sequence number |
- Accept the Sequence Reset (Reset) message without regards to its MsgSeqNum(34)
- Generate a "warning" condition in test output
|
c. Receive Sequence Reset (Reset)<4> message with NewSeqNo(36) < than expected sequence number |
- Accept the Sequence Reset (Reset) message without regards to its MsgSeqNum(34)
- Send Reject<3> (session-level) message referencing invalid MsgType(35) (≥ FIX 4.2: SessionRejectReason(373)
= 5 - "Value is incorrect (out of range) for this tag")
- Do NOT Increment inbound MsgSeqNum
- Generate an "error" condition in test output
- Do NOT lower expected sequence number
|
12 |
|
Initiate logout process |
Mandatory |
Initiate Logout |
- Send Logout<5> message
- Wait for counterparty to respond with Logout message up to 10 seconds (note may not be received if communications problem exists). If not received, generate a “warning” condition in test output.
- Disconnect
|
13 |
|
Receive Logout message |
Mandatory |
a. Receive valid Logout<5> message in response to a solicited logout process |
Disconnect without sending a message |
b. Receive valid Logout<5> message unsolicitied |
- Send Logout response message
- Wait for counterparty to disconnect up to 10 seconds. If max exceeded, disconnect and generate an “error” condition in test output.
|
14 |
|
Receive application or administrative message |
Mandatory |
a. Receive field identifier (tag number) not defined in specification. Exception: undefined tag used is specified in testing profile as user-defined. |
- Send Reject<3> (session-level) message referencing invalid tag number (≥ FIX 4.2: SessionRejectReason(373) = 0 - "Invalid tag number")
- Increment inbound MsgSeqNum(34)
- Generate an "error" condition in test output
|
b. Receive message with a required field identifier (tag number) missing. |
- Send Reject (session-level) message referencing required tag missing (≥ FIX 4.2: SessionRejectReason(373) = 1 - "Required tag missing")
- Increment inbound MsgSeqNum(34)
- Generate an "error" condition in test output
|
c. Receive message with field identifier (tag number) which is defined in the specification but not defined for this message type. Exception: undefined tag used is specified in testing profile as
user-defined
for this message type. |
- Send Reject<3> (session-level) message referencing tag not defined for this message type (≥ FIX 4.2: SessionRejectReason(373) = 2 - "Tag not
defined for this message type")
- Increment inbound MsgSeqNum(34)
- Generate an "error" condition in test output
|
d. Receive message with field identifier (tag number) specified but no value (e.g. "55=<SOH>" vs. "55=IBM<SOH>"). |
- Send Reject<3> (session-level) message referencing tag not defined for this message type (≥ FIX 4.2: SessionRejectReason(373) = 4 - "Tag
specified without a value")
- Increment inbound MsgSeqNum(34)
- Generate an "error" condition in test output
|
e. Receive message with incorrect value (out of range or not part of valid list of enumerated values) for a particular field identifier (tag number). Exception: undefined enumeration values used are
specified
in testing profile as user-defined. |
- Send Reject<3> (session-level) message referencing tag not defined for this message type (≥ FIX 4.2: SessionRejectReason(373) = 5 - "Value is
incorrect (out of range) for this tag")
- Increment inbound MsgSeqNum(34)
- Generate an "error" condition in test output
|
f. Receive message with a value in an incorrect data format (syntax) for a particular field identifier (tag number). |
- Send Reject<3> (session-level) message referencing tag not defined for this message type (≥ FIX 4.2: SessionRejectReason(373) = 6 - "Incorrect
data format for value")
- Increment inbound MsgSeqNum(34)
- Generate an "error" condition in test output
|
g. Receive a message in which the following is not true: Standard Header fields appear before Body fields which appear before Standard
Trailer fields. |
- Send Reject<3> (session-level) message referencing incorrect message structure header+body+trailer (≥ FIX 4.3: SessionRejectReason(373) = 14 -
"Tag specified out of required order")
- Increment inbound MsgSeqNum(34)/li>
- Generate an "error" condition in test output
|
h. Receive a message in which a field identifier (tag number) which is not part of a repeating group is specified more than once |
- Send Reject<3> (session-level) message referencing duplicate field identifier (tag number) (≥ FIX 4.3: SessionRejectReason(373) = 13 "Tag
appears more than once")
- Increment inbound MsgSeqNum(34)
- Generate an "error" condition in test output
|
i. Receive a message with repeating groups in which the "count" field value for a repeating group is incorrect |
- Send Reject<3> (session-level) message referencing the incorrect "count" field identifier (tag number) (≥ FIX 4.3: SessionRejectReason(373) =
16 - "Incorrect NumInGroup count for repeating group")
- Increment inbound MsgSeqNum(34)
- Generate an "error" condition in test output
|
j. Receive a message with repeating groups in which the order of repeating group fields does not match the specification. |
- Send Reject<3> (session-level) message referencing the repeating group with incorrect field ordering (≥ FIX 4.3: SessionRejectReason(373) = 15
"Repeating group fields out of order")
- Increment inbound MsgSeqNum(34)
- Generate an "error" condition in test output
|
k. Receive a message with a field of a data type other than "data" which contains one or more embedded <SOH> values. |
- Send Reject<3> (session-level) message referencing field identifier (tag number) with embedded <SOH> (≥ FIX 4.3: SessionRejectReason(373) = 17
- "Non "data" value includes field delimiter (SOH character)")
- Increment inbound MsgSeqNum(34)
- Generate an "error" condition in test output
-
Discard as valid response/outcome too or Consider garbled and ignore message
|
l. Receive a message when application-level processing or system is not available (Optional) |
- If < FIX 4.2
- Send Reject<3> (session-level) message referencing application message processing is not available
- If ≥ FIX 4.2
- Send Business Message Reject<j> message referencing application message processing is not available (≥ FIX 4.2: BusinessRejectReason(380) = 4 - "Application not available")
- Increment inbound MsgSeqNum(34)
- Generate a "warning" condition in test output
|
m. Receive a message in which a conditionally required field is missing |
- If < FIX 4.2
- Send Reject<3> (session-level) message referencing field identifier (tag number) of the missing conditionally required field(s)
- If ≥ FIX 4.2
- Send Business Message Reject<j> message referencing field identifier (tag number) of the missing conditionally required field(s) (≥ FIX 4.2: BusinessRejectReason(380) = 5 - "Conditionally Required Field Missing")
- Increment inbound MsgSeqNum(34)
- Generate an "error" condition in test output
|
n. Receive a message in which a field identifier (tag number) appears in both cleartext and encrypted section but has different values |
- Send Reject<3> (session-level) message referencing field identifier (tag number) missing from unencrypted section (≥ FIX 4.2: SessionRejectReason(373) = 7 - "Decryption problem")
- Increment inbound MsgSeqNum(34)
- Generate an "error" condition in test output
|
15 |
|
Send application or administrative messages to test normal and abnormal behavior/response |
|
Send more than one message of the same type with header and body fields ordered differently to verify acceptance. (Exclude those which have restrictions regarding order) |
Messages accepted and subsequent messages’ MsgSeqNum(34) are accepted |
16 |
|
Queue outgoing messages |
Mandatory |
a. Message to send/queue while disconnected |
Queue outgoing messages. Note there are two valid approaches:
- Queue without regards to MsgSeqNum(34)
- Store data for messages
- Queue each message with the next MsgSeqNum value
- Store data for messages in such a manner as to use and "consume" the next MsgSeqNum(34)
Note: SendingTime(52): must contain the time the message is sent not the time the message was queued
|
b. Re-connect with queued messages |
- Complete logon process (connect, and Logon<A> message exchange)
- Complete MsgSeqNum recovery process if applicable
- Recommended short delay or TestRequest<1>/Heartbeat<0> to verify MsgSeqNum recovery completed
- Note there are two valid queuing approaches:
- Queue without regards to MsgSeqNum(34)
- Send queued messages with new MsgSeqNum values (greater than Logon message’s MsgSeqNum)
- Queue each message with the next MsgSeqNum value
- (note Logon<A> message’s MsgSeqNum will be greater than the queued messages' MsgSeqNum)
- Counterparty will issue ResendRequest<2> requesting the range of missed messages
- Resend each queued message with PossDupFlag(43) set to "Y"
Note: SendingTime(52): must contain the time the message is sent not the time the message was queued
|
17 |
|
Support encryption |
Optional |
a. Receive Logon<A> message with valid, supported EncryptMethod(98) |
- Accept the message
- Perform the appropriate decryption and encryption method readiness
- Respond with Logon message with the same EncryptMethod
|
b. Receive Logon<A> message with invalid or unsupported EncryptMethod(98) |
- Send Reject<3> (session-level) message referencing invalid or unsupported EncryptMethod value (≥ FIX 4.2: SessionRejectReason(373) = 7 - "Decryption
problem")
- Increment inbound MsgSeqNum(34)
- Send Logout<5> message referencing invalid or unsupported EncryptMethod value
- (optional) Wait for Logout message response (note could have decrypt problems) or wait 2 seconds whichever comes first
- Disconnect
- Generate an "error" condition in test output
|
c. Receive message with valid SignatureLength(93) and Signature(89) values |
Accept the message |
d. Receive message with invalid SignatureLength(93) value |
- Send Reject<3> (session-level) message referencing invalid SignatureLength value (≥ FIX 4.2: SessionRejectReason(373) = 8 - "Signature problem")
- Increment inbound MsgSeqNum(34)
- Generate an "error" condition in test output
|
e. Receive message with invalid Signature(89) value |
Process message:
- Send Reject<3> (session-level) message referencing invalid Signature value (≥ FIX 4.2: SessionRejectReason(373) = 8 - "Signature problem")
- Increment inbound MsgSeqNum(34)
- Generate an "error" condition in test output
Or consider decryption error or message out of order, ignore message (do not increment inbound MsgSeqNum) and continue accepting messages
|
f. Receive message with a valid SecureDataLen(90) value and a SecureData(91) value that can be decrypted into valid, parse-able cleartext |
Accept the message |
g. Receive message with invalid SecureDataLen(90) value |
- Consider decryption error or message out of order, ignore message (do not increment inbound MsgSeqNum) and continue accepting messages
- Generate a "warning" condition in test output
|
h. Receive message with a SecureData(91) value that cannot be decrypted into valid, parse-able cleartext |
- Send Reject<3> (session-level) message referencing invalid SecureData value (≥ FIX 4.2: SessionRejectReason(373) = 7 - " Decryption problem")
- Increment inbound MsgSeqNum(34)
- Generate a "warning" condition in test output
|
i. Receive message with one or more fields not present in the unencrypted portion of the message that "must be unencrypted" according to the spec |
- Send Reject<3> (session-level) message referencing field identifier (tag number) missing from unencrypted section (≥ FIX 4.2: SessionRejectReason(373) = 7 - " Decryption problem")
- Increment inbound MsgSeqNum(34)
- Generate a "warning" condition in test output
|
j. Receive message with incorrect handling of "left over" characters (e.g. when length of clear text prior to encryption is not a multiple of 8) according to the specified EncryptMethod(98) |
- Send Reject<3> (session-level) message referencing incorrect handling of "left over" characters during encryption (≥ FIX 4.2: SessionRejectReason(373) = 7 - " Decryption problem")
- Increment inbound MsgSeqNum(34)
- Generate a "warning" condition in test output
|
18 |
|
Support third party addressing |
Optional |
a. Receive messages with OnBehalfOfCompID(115) and DeliverToCompID(128) values expected as specified in testing profile and with correct usage |
Accept messages |
b. Receive messages with OnBehalfOfCompID(115) or DeliverToCompID(128) values not specified in testing profile or incorrect usage |
- SendReject<3> (session-level) message referencing invalid OnBehalfOfCompID or DeliverToCompID (≥ FIX 4.2: SessionRejectReason(373) = 9 - "CompID
problem")
- Increment inbound MsgSeqNum(34)
- Generate a "warning" condition in test output
|
19 |
|
Test PossResend handling |
Mandatory |
a. Receive message with PossResend(97) = "Y" and application-level check of Message specific ID indicates that it has already been seen on this session |
- Ignore the message
- Generate a "warning" condition in test output
|
b. Receive message with PossResend(97) = "Y" and application-level check of Message specific ID indicates that it has NOT yet been seen on this session |
Accept and process the message normally |
20 |
|
Simultaneous Resend request test |
Mandatory |
Receive a Resend Request<2> message while having sent and awaiting complete set of responses to a Resend Request message |
- Perform resend of requested messages
- Send Resend Request to request missed messages
|