Assertions across messages
A step’s expect: checks exact values (fields, paths), presence (present, absent), the MTI, latency and the MAC. Four more checks say what a value must look like, or that it agrees with what was sent.
Shapes: matches
Section titled “Shapes: matches” - name: An approval carries a six character code send: {sample: auth, amount: 1000} expect: fields: {39: "00"} matches: {38: "^[0-9A-Z]{6}$", "48.10": "^[0-9]{4}$"}A regular expression the value must match in full; a field by number, a sub-element by its path in quotes. Patterns may use {{variables}}.
Bounds: ranges
Section titled “Bounds: ranges” expect: ranges: {4: [100, 5000], 28: [0, 250]}The field’s digits as sent, compared as numbers: minor units for amounts. Two bounds, low and high, both included.
Consistency: echoes
Section titled “Consistency: echoes” - name: The response echoes what was sent send: {sample: auth, amount: 1000} expect: {echoes: [4, 11, 37, 41, 42]}Each listed field must be in the response with the request’s value: the amount, STAN, RRN, terminal and merchant come back as sent. A field the request didn’t carry fails the check, so the list stays honest. echoes is for send steps: it compares the step’s response with its own request.
Reversals and advices: original
Section titled “Reversals and advices: original” - name: Purchase send: {sample: financial, amount: 2500} expect: {fields: {39: "00"}} - name: The host reverses it receive: {mti: "0420"} expect: {original: 90} reply: {}Field 90 of the received 0420 (or of a reversal’s response) must name the request the previous send step sent: its MTI, STAN and transmission time, then the acquirer (field 32) and forwarder (33) when the original carried them, each zero filled to 11 digits as the field lays them out. The failure text shows both.
original works on send and receive steps; the request it refers to is the one the last send step sent, whatever host answered it.
Reading failures
Section titled “Reading failures”Every check adds its own line to the step’s failures with the values compared, masked as other failures are: “Field 4 is ‘000000090000’ (90000), outside 100 to 5000”, “Field 11 is ‘000124’, the request sent ‘000123’”.