-
Notifications
You must be signed in to change notification settings - Fork 1
Payment Driver ‐ Test Scenarios
golmek edited this page Jul 27, 2023
·
18 revisions
All tests are run with multi transactions on or off (with exceptions). Check status at the end.
Test Number | Preconditions | Description | Steps | Expected Result | Associated Payment Driver Status |
---|---|---|---|---|---|
1 | TBD | Single token transfer transaction -> account1 | TBD | Account1 balance changed accordingly | TBD |
2 | TBD | Multiple token transfer transactions to one account (account1) | TBD | Account1 balance changed accordingly | TBD |
3 | TBD | Token transfer to different accounts (without duplications) | TBD | Check accounts balance after finish | TBD |
4 | TBD | Multiple token transfers to multiple accounts (with duplications) | TBD | Check accounts balance after finish | TBD |
5 | TBD | Single transaction when no gas on account (test can be duplicated with small amount of gas) | TBD | Status of the driver is no gas left (with information how much you have and how much you need) | Suggested code eror: ErrorBiedak{msg: "Jesteś biedakiem"} |
6 | TBD | Single transaction when no token on account (test can be duplicated with small amount of token) | TBD | Status of the driver is no token left. | TBD |
7 | TBD | Single transaction that you can not sign (due to missing private key in config) | TBD | Status of invalid transaction due to impossiblity of signing it. | TBD |
8 | TBD | Transaction with wrong chain id | TBD | Status of invalid transaction due to missing chain id in configuration? | TBD |
9 | TBD | Transaction to null address | TBD | Invalid transaction due to trying to send to zero. | TBD |
10 | Blockchain in high gas state. | Single transaction with gas limit set low, after deadline | TBD | transaction is stuck - probably due to high gas conditions. | TBD |
11 | TBD | Wrong nonce (other transaction done in the same moment) | TBD | Invalid transaction due to wrong nonce. | TBD |
12 | TBD | Test scenario with cancelling transaction: 1. Transaction is stuck due to low gas price 2. Transaction is cancelled and retried (it should be exactly the same transaction) | TBD | New transaction is send instead of old | X |
13 | TBD | Test scenario with cancelling transaction and lowering gas between 1st and 2st step: 1. Transaction is stuck due to low gas price 2. Transaction is cancelled and retried, but in the middle old transaction is processed | TBD | New transaction has wrong nonce error, but driver detects that old transaction is processed and succeeded (all token transfers points now to old transaction) | TBD |
14 | TBD | The same as 12 but with 3 transactions (chaining). Details to be thinked of. Test scenario with cancelling transaction and lowering gas between 1st and 2st step 1. Transaction is stuck due to low gas price 2. Transaction is cancelled and retried, but in the middle old transaction is processed | TBD | New transaction has wrong nonce error, but driver detects that old transaction is processed and succeeded (all token transfers points now to old transaction) | TBD |
15 | TBD | Single transaction wrong nonce (because of external transaction) Start two instances at once. | TBD | Random one should succeed and other should have invalid transaction due to wrong nonce. | TBD |
16 | TBD | Load tests (for example 100000 transactions to be processed) | TBD | TBD | TBD |
TBD | TBD | TBD | TBD | TBD | TBD |
This tests can be preformed in different configurations (for example payments generated during the run)
f