Data driven unit testing setup is created for this project. I have choosen excel for the data input as its easy to use and setup.
Steps to run unit tests:
- Rename file
src/tests/testCases.example.xlsx
totestCases.xlsx
. - Paste you test data in the excel sheet in the exact format. (DO NOT MODIDFY EXCEL STRUCTURE)
- Run script
node scripts/prepareTestData.js
- A json file will be generated at
src/tests/testCases.json
- Run command
npm run test
Test case excel has following columns:
- name: name of the test case
- message: Actual SMS
- accountType: Expected account type (WALLET, BANK, CREDIT)
- accountName: Expected account name
- accountNumber: Expected account number
- transactionAmount: Transaction amount
- transactionType: Transaction type
- balanceAvailable: Available balance (if present)
- balanceOutstanding: Outstanding balance (in case of credit cards)
On Android you can use SMS, Call - XML, PDF, CSV(Super Backup & Restore) to export inbox as csv