Tutorial: testing a switch
You run a switch or a network node: the system between acquirers and issuers that routes by card number, stands in when an issuer is down, and owes advices afterwards. Testing it needs both sides at once: traffic coming in, and issuers behind it that answer, fail and recover on cue. The Platform is both: its runner sends your switch the traffic, and its simulated hosts are the issuers behind it, each in the format its link speaks.
This tutorial takes about half an hour. The reference switch, which every install runs, stands in for yours here; Try it end to end in the console’s Help menu creates the issuers it routes to.
1. The issuers behind the switch
Section titled “1. The issuers behind the switch”Under Hosts, make one simulated host per issuer your switch routes to, on the port your switch expects, in its format: the demo’s Issuer speaks ASCII with a two-byte length header, its Mainframe issuer EBCDIC with a four-byte header, and each has rules of its own. A stateful issuer among them gives you balances that move across the switch (the stateful issuer walkthrough).
2. The traffic through the switch
Section titled “2. The traffic through the switch”examples/tutorials/switch-team.yaml targets the switch by address, as you’d target your own: the switch answers an echo itself, routes a Visa card to its issuer and relays the approval, relays the issuer’s decline as it came, routes a reversal the same way, and declines a card it has no route for with its own code. Paste it under Scenarios and run it; the run shows each exchange, and the message log shows what reached the issuers, with the switch’s own STANs and its institution id in field 33.
Change the target to your switch’s address and port, and the issuers’ ports to the ones your switch is configured for.
3. Make an issuer fail
Section titled “3. Make an issuer fail”Stop the simulated issuer from its page: the next request through the switch gets whatever your switch does without it, a stand-in approval, a decline with 91, or a timeout. Start the issuer again and watch the advices your switch owed it arrive (the message log shows the 0120s and 0420s, and a stateful issuer applies them). The chaos experiments walkthrough does this on a schedule, with latency, loss and flapping connections on the link to the issuer while a load run is on.
4. Links that behave like production
Section titled “4. Links that behave like production”A switch’s links have a life of their own: echoes the issuer sends, sign-on before traffic, cutover at the end of the day. A simulated host sends its own messages on a schedule and can require sign-on; a scenario receives and answers them, as your switch must. The message flows walkthrough has a host that echoes of its own accord and a run that signs on.
5. Load and failover
Section titled “5. Load and failover”Send thousands of authorizations a second through your switch to several simulated issuers, watch the response codes and latencies by the second, and kill an issuer midway: the load testing walkthrough. The networks walkthrough turns a simulated host into a network node of ours, which routes, stands in and owes advices the way yours does, so you can see the behaviour you’re testing for.
Where to look next
Section titled “Where to look next”Every network’s response codes, in its own words, are in the network codes walkthrough. Which messages and fields your scenarios exercise, against what the switch should handle, is the coverage walkthrough. A signed record of a run, for a certification or an audit, is the evidence walkthrough.