Altering test cases in Excel for the ISO8583 simulator
Posted on 9th Nov 2017 8717 views

When you need to customize your own test case, you need to follow some simple steps all the time.
In order to obtain this, you need to alter test data in Excel, save your new test data, export for the simulator, restart simulator with new test cases.
Changing test cases with the neaPay ISO8583 simulator is really easy because you just need to work with Excel.
1. Go to the deployment folder, for example C:/neaPaySimulator
2. Go inside the Acquirer instance(for example neapay_ACQ_client)
3. Go inside folder test_data (E.g. C:/neaPaySimulator/neapay_ACQ_client).
4. Open spreadsheet ISO8583_TestCases_v3.1.xlsm.
Warning: It is advised to NEVER edit the CSV files.
5. Go to sheet ISO8583_Acquirer to edit Acquirer test cases (These are messages that the simulator builds)
We will refer to this as the Acquirer Sheet from now on.
6. Update the columns to the corresponding fields. For example, Amount in Filed 4 (DE04) on column R.
7. The simulator can populate the fields with values, if values are inserted
8. The simulator can use some keywords to trigger a specific javascript behaviour
Below are some standard values that you may want to remember. They are checked in the following script:
script_acquirer.js:function buildField(name, field, caseField, isoMessageAcqRq) {
**SYSTEM** means that the simulator will use script logic to build that field. It is used to retrueve system time and date, generate random values, perform complex operations, or perform cryptography, or make external calls; So the value will be populated by the system. Script reference:
script_acquirer.js:function buildSystemField(name, field, caseField) {
**NOVALUE** means that the simulator will not use that field, and will not include it in the message. The Bitmap will NOT be activated for this field.
**CARDFILE** means that the simulator will use the Cards Sheet any to build that field, and will look up the card key selected set for that transaction;
script_acquirer.js:function buildCardField(name, field, currentCard) {
**TERMFILE** means that the simulator will use the Terminals Sheet to build that field, and will look up the Terminal set for that transaction; You can also use Excel's sheet reference information to retrieve information from another sheet, whoch may prove easier
12345 - if a text value is set, that value will be loaded in the message exactly from the spreadsheet. If the value is longer than defined, the simulator will trim it; if it is shorter, the simulator will pad it as defined. If you use binary data, paste the hex representation of the binary data and the simulator will convert it automatically when loaded in a binary field.
9. Edit column AW (DE 35) and change it from **SYSTEM** to a value of "12345678910"
10. Press the "Save Test Data CSV" button inside the sheet, next to the neaPay logo. It will ask you about saving the excel file and exporting a .csv. Answer Yes.
Warning: It is advised to NEVER edit the CSV files. This button will generate the CSV files
11. Close the Excel file (optional).
12. Close the Acquirer simulator. The server can keep running.
13. Open and Start again the Acquirer simulator, check that it has connected.
14. When the Transactions List window opens, check that your new transaction is available in the list.
15. Select your configured transaction and click the Send button.
16. Check the Acquirer Console for the text Test case: and check that after that, the field 35 has the value you wrote above.
Congratulations! You have successfully configured your own test case!