DEV Community

Ramkumar SG for RippleX Developers

Posted on

Batch Transaction - Testcases

Mode: allornothing

  1. Test Batch allornothing all payments succeed
  2. Test Batch allornothing submit batch multiple times
  3. Test Batch allornothing one payment fails
  4. Test Batch allornothing all payments fail
  5. Test Batch allornothing mixed transaction types
  6. Test Batch allornothing fee calculation
  7. Test Batch allornothing max inner transactions
  8. Test Batch allornothing more than max inner transactions
  9. Test Batch allornothing cash same check multiple times
  10. Test Batch allornothing fail and then succeed
  11. Test Batch allornothing with tickets

Mode: onlyone

  1. Test Batch onlyone first succeeds
  2. Test Batch onlyone first fails second succeeds
  3. Test Batch onlyone all fail
  4. Test Batch onlyone offer priority
  5. Test Batch onlyone max inner transactions
  6. Test Batch onlyone more than max inner transactions
  7. Test Batch onlyone cash same check multiple times
  8. Test Batch onlyone fail and then succeed

Mode: untilfailure

  1. Test Batch untilfailure all succeed
  2. Test Batch untilfailure stops at first
  3. Test Batch untilfailure stops at second
  4. Test Batch untilfailure stops at third
  5. Test Batch untilfailure sequential setup
  6. Test Batch untilfailure progressive payments
  7. Test Batch untilfailure mixed success failure pattern
  8. Test Batch untilfailure max inner transactions
  9. Test Batch untilfailure more than max inner transactions
  10. Test Batch untilfailure cash same check multiple times
  11. Test Batch untilfailure fail and then succeed

Mode: independent

  1. Test Batch independent all succeed
  2. Test Batch independent some fail
  3. Test Batch independent all fail
  4. Test Batch independent parallel operations
  5. Test Batch independent mixed transaction types
  6. Test Batch independent account setup operations
  7. Test Batch independent max transactions
  8. Test Batch independent more than max transactions
  9. Test Batch independent cash same check multiple times
  10. Test Batch independent fail and then succeed

Multi account tests (with signers)

  1. Test Batch multiaccount workflow all payments succeed
  2. Test Batch multiaccount atomic swap xrp for xrp
  3. Test Batch multiaccount atomic swap xrp for token
  4. Test Batch multiaccount circular three way swap
  5. Test Batch multiaccount with submitter not in inner txns
  6. Test Batch multiaccount without signers
  7. Test Batch multiaccount with max signers
  8. Test Batch multiaccount with more than max signers
  9. Test Batch multiaccount txn1 fails txn2 succeeds
  10. Test Batch multiaccount create check succeeds cash check fails
  11. Test Batch multiaccount delete accounts too soon with other account as signer[Batch.tfAllOrNothing]
  12. Test Batch multiaccount delete accounts too soon with other account as signer[Batch.tfOnlyOne]
  13. Test Batch multiaccount delete accounts too soon with other account as signer[Batch.tfUntilFailure]
  14. Test Batch multiaccount delete accounts too soon with other account as signer[Batch.tfIndependent]
  15. Test Batch multiaccount delete accounts after flag ledger with other account as signer
  16. Test Batch multiaccount delete submitting account after flag ledger with no signer
  17. Test Batch multiaccount delete submitting account after flag ledger with signer
  18. Test Batch multiaccount alice creates offer bob creates offer[Batch.tfAllOrNothing]
  19. Test Batch multiaccount alice creates offer bob creates offer[Batch.tfOnlyOne]
  20. Test Batch multiaccount alice creates offer bob creates offer[Batch.tfUntilFailure]
  21. Test Batch multiaccount alice creates offer bob creates offer[Batch.tfIndependent]
  22. Test Batch multiaccount create nftokenmint nftokenoffercreate fails reverts nftokenmint[Batch.tfAllOrNothing]
  23. Test Batch multiaccount create nftokenmint nftokenoffercreate fails reverts nftokenmint[Batch.tfOnlyOne]
  24. Test Batch multiaccount create nftokenmint nftokenoffercreate fails reverts nftokenmint[Batch.tfUntilFailure]
  25. Test Batch multiaccount create nftokenmint nftokenoffercreate fails reverts nftokenmint[Batch.tfIndependent]

Batch with Vault transactions

  1. Test Batch with vault create[Batch.tfAllOrNothing]
  2. Test Batch with vault create[Batch.tfOnlyOne]
  3. Test Batch with vault create[Batch.tfUntilFailure]
  4. Test Batch with vault create[Batch.tfIndependent]
  5. Test Batch with vault set[Batch.tfAllOrNothing]
  6. Test Batch with vault set[Batch.tfOnlyOne]
  7. Test Batch with vault set[Batch.tfUntilFailure]
  8. Test Batch with vault set[Batch.tfIndependent]
  9. Test Batch with vault deposit[Batch.tfAllOrNothing]
  10. Test Batch with vault deposit[Batch.tfOnlyOne]
  11. Test Batch with vault deposit[Batch.tfUntilFailure]
  12. Test Batch with vault deposit[Batch.tfIndependent]
  13. Test Batch with vault withdraw[Batch.tfAllOrNothing]
  14. Test Batch with vault withdraw[Batch.tfOnlyOne]
  15. Test Batch with vault withdraw[Batch.tfUntilFailure]
  16. Test Batch with vault withdraw[Batch.tfIndependent]
  17. Test Batch with vault delete[Batch.tfAllOrNothing]
  18. Test Batch with vault delete[Batch.tfOnlyOne]
  19. Test Batch with vault delete[Batch.tfUntilFailure]
  20. Test Batch with vault delete[Batch.tfIndependent]
  21. Test Batch with vault clawback[Batch.tfAllOrNothing]
  22. Test Batch with vault clawback[Batch.tfOnlyOne]
  23. Test Batch with vault clawback[Batch.tfUntilFailure]
  24. Test Batch with vault clawback[Batch .tfIndependent]

Batch with LoanBroker/Loan transactions

  1. Test Batch with loan broker set[Batch.tfAllOrNothing]
  2. Test Batch with loan broker set[Batch.tfOnlyOne]
  3. Test Batch with loan broker set[Batch.tfUntilFailure]
  4. Test Batch with loan broker set[Batch.tfIndependent]
  5. Test Batch with loan broker delete[Batch.tfAllOrNothing]
  6. Test Batch with loan broker delete[Batch.tfOnlyOne]
  7. Test Batch with loan broker delete[Batch.tfUntilFailure]
  8. Test Batch with loan broker delete[Batch.tfIndependent]
  9. Test Batch with loan broker cover deposit[Batch.tfAllOrNothing]
  10. Test Batch with loan broker cover deposit[Batch.tfOnlyOne]
  11. Test Batch with loan broker cover deposit[Batch.tfUntilFailure]
  12. Test Batch with loan broker cover deposit[Batch.tfIndependent]
  13. Test Batch with loan broker cover withdraw[Batch.tfAllOrNothing]
  14. Test Batch with loan broker cover withdraw[Batch.tfOnlyOne]
  15. Test Batch with loan broker cover withdraw[Batch.tfUntilFailure]
  16. Test Batch with loan broker cover withdraw[Batch.tfIndependent]
  17. Test Batch with loan broker cover clawback[Batch.tfAllOrNothing]
  18. Test Batch with loan broker cover clawback[Batch.tfOnlyOne]
  19. Test Batch with loan broker cover clawback[Batch.tfUntilFailure]
  20. Test Batch with loan broker cover clawback[Batch.tfIndependent]
  21. Test Batch with loan set[Batch.tfAllOrNothing]
  22. Test Batch with loan set[Batch.tfOnlyOne]
  23. Test Batch with loan set[Batch.tfUntilFailure]
  24. Test Batch with loan set[Batch.tfIndependent]
  25. Test Batch with loan pay[Batch.tfAllOrNothing]
  26. Test Batch with loan pay[Batch.tfOnlyOne]
  27. Test Batch with loan pay[Batch.tfUntilFailure]
  28. Test Batch with loan pay[Batch.tfIndependent]
  29. Test Batch with loan delete[Batch.tfAllOrNothing]
  30. Test Batch with loan delete[Batch.tfOnlyOne]
  31. Test Batch with loan delete[Batch.tfUntilFailure]
  32. Test Batch with loan delete[Batch.tfIndependent]
  33. Test Batch with loan manage[Batch.tfAllOrNothing]
  34. Test Batch with loan manage[Batch.tfOnlyOne]
  35. Test Batch with loan manage[Batch.tfUntilFailure]
  36. Test Batch with loan manage[Batch .tfIndependent]

Batch with various transaction types

  1. Test Batch transaction type trustset[Batch.tfAllOrNothing]
  2. Test Batch transaction type trustset[Batch.tfOnlyOne]
  3. Test Batch transaction type trustset[Batch.tfUntilFailure]
  4. Test Batch transaction type trustset[Batch.tfIndependent]
  5. Test Batch transaction type offercreate[Batch.tfAllOrNothing]
  6. Test Batch transaction type offercreate[Batch.tfOnlyOne]
  7. Test Batch transaction type offercreate[Batch.tfUntilFailure]
  8. Test Batch transaction type offercreate[Batch.tfIndependent]
  9. Test Batch transaction type account set[Batch.tfAllOrNothing]
  10. Test Batch transaction type account set[Batch.tfOnlyOne]
  11. Test Batch transaction type account set[Batch.tfUntilFailure]
  12. Test Batch transaction type account set[Batch.tfIndependent]
  13. Test Batch transaction type escrow create[Batch.tfAllOrNothing]
  14. Test Batch transaction type escrow create[Batch.tfOnlyOne]
  15. Test Batch transaction type escrow create[Batch.tfUntilFailure]
  16. Test Batch transaction type escrow create[Batch.tfIndependent]
  17. Test Batch transaction type check create[Batch.tfAllOrNothing]
  18. Test Batch transaction type check create[Batch.tfOnlyOne]
  19. Test Batch transaction type check create[Batch.tfUntilFailure]
  20. Test Batch transaction type check create[Batch.tfIndependent]
  21. Test Batch transaction type nftokenmint[Batch.tfAllOrNothing]
  22. Test Batch transaction type nftokenmint[Batch.tfOnlyOne]
  23. Test Batch transaction type nftokenmint[Batch.tfUntilFailure]
  24. Test Batch transaction type nftokenmint[Batch.tfIndependent]
  25. Test Batch with ticket create transaction
  26. Test Batch transaction type signerlistset[Batch.tfAllOrNothing]
  27. Test Batch transaction type signerlistset[Batch.tfOnlyOne]
  28. Test Batch transaction type signerlistset[Batch.tfUntilFailure]
  29. Test Batch transaction type signerlistset[Batch.tfIndependent]
  30. Test Batch transaction type depositpreauth[Batch.tfAllOrNothing]
  31. Test Batch transaction type depositpreauth[Batch.tfOnlyOne]
  32. Test Batch transaction type depositpreauth[Batch.tfUntilFailure]
  33. Test Batch transaction type depositpreauth[Batch.tfIndependent]
  34. TODO: Batch transaction with MPT as inner transactions

Miscellaneous tests

  1. Test Batch empty raw transactions[Batch.tfAllOrNothing]
  2. Test Batch empty raw transactions[Batch.tfOnlyOne]
  3. Test Batch empty raw transactions[Batch.tfUntilFailure]
  4. Test Batch empty raw transactions[Batch.tfIndependent]
  5. Test Batch with one raw transaction[Batch.tfAllOrNothing]
  6. Test Batch with one raw transaction[Batch.tfOnlyOne]
  7. Test Batch with one raw transaction[Batch.tfUntilFailure]
  8. Test Batch with one raw transaction[Batch.tfIndependent]
  9. Test Batch with all inner transactions having no tfInnerBatchTxn flag[Batch.tfAllOrNothing]
  10. Test Batch with all inner transactions having no tfInnerBatchTxn flag[Batch.tfOnlyOne]
  11. Test Batch with all inner transactions having no tfInnerBatchTxn flag[Batch.tfUntilFailure]
  12. Test Batch with all inner transactions having no tfInnerBatchTxn flag[Batch.tfIndependent]
  13. Test Batch with some inner transactions having no tfInnerBatchTxn flag[Batch.tfAllOrNothing]
  14. Test Batch with some inner transactions having no tfInnerBatchTxn flag[Batch.tfOnlyOne]
  15. Test Batch with some inner transactions having no tfInnerBatchTxn flag[Batch.tfUntilFailure]
  16. Test Batch with some inner transactions having no tfInnerBatchTxn flag[Batch.tfIndependent]
  17. Test Batch with all inner transactions having incorrect tfInnerBatchTxn flag
  18. Test Batch with tfInnerBatchTxn flag set for outer transaction
  19. Test Batch with no mode set for outer transaction
  20. Test Batch with invalid mode set for outer transaction
  21. Test Batch with inner transactions having no fee field[Batch.tfAllOrNothing]
  22. Test Batch with inner transactions having no fee field[Batch.tfOnlyOne]
  23. Test Batch with inner transactions having no fee field[Batch.tfUntilFailure]
  24. Test Batch with inner transactions having no fee field[Batch.tfIndependent]
  25. Test Batch with inner transactions having invalid fee values[-1.5]
  26. Test Batch with inner transactions having invalid fee values[1.5]
  27. Test Batch with inner transactions having invalid fee values[58E4CD288]
  28. Test Batch with inner transactions having invalid fee values[fee value3]
  29. Test Batch with inner transactions having invalid fee values[~!@#$%^&*() -=+[{<>]};
  30. Test Batch with inner transactions having bad fee values[-1]
  31. Test Batch with inner transactions having bad fee values[1]
  32. Test Batch with inner transactions with SigningPubKey
  33. Test Batch with inner transactions with fee and SigningPubKey
  34. Test Batch with inner transactions with TxnSignature
  35. Test Batch with invalid inner transactions[Batch.tfAllOrNothing]
  36. Test Batch with invalid inner transactions[Batch.tfOnlyOne]
  37. Test Batch with invalid inner transactions[Batch.tfUntilFailure]
  38. Test Batch with invalid inner transactions[Batch.tfIndependent]
  39. Test Batch inside non empty batch[Batch.tfAllOrNothing]
  40. Test Batch inside non empty batch[Batch.tfOnlyOne]
  41. Test Batch inside non empty batch[Batch.tfUntilFailure]
  42. Test Batch inside non empty batch[Batch.tfIndependent]
  43. Test Batch inside empty batch[Batch.tfAllOrNothing]
  44. Test Batch inside empty batch[Batch.tfOnlyOne]
  45. Test Batch inside empty batch[Batch.tfUntilFailure]
  46. Test Batch inside empty batch[Batch.tfIndependent]
  47. Test Batch inner txns with same sequence[Batch.tfAllOrNothing]
  48. Test Batch inner txns with same sequence[Batch.tfOnlyOne]
  49. Test Batch inner txns with same sequence[Batch.tfUntilFailure]
  50. Test Batch inner txns with same sequence[Batch.tfIndependent]
  51. Test Batch inner txns with past sequence[Batch.tfAllOrNothing]
  52. Test Batch inner txns with past sequence[Batch.tfOnlyOne]
  53. Test Batch inner txns with past sequence[Batch.tfUntilFailure]
  54. Test Batch inner txns with past sequence[Batch.tfIndependent]
  55. Test Batch inner txns with future not incremental sequences[Batch.tfAllOrNothing]
  56. Test Batch inner txns with future not incremental sequences[Batch.tfOnlyOne]
  57. Test Batch inner txns with future not incremental sequences[Batch.tfUntilFailure]
  58. Test Batch inner txns with future not incremental sequences[Batch.tfIndependent]
  59. Test Batch with account does not exist[Batch.tfAllOrNothing]
  60. Test Batch with account does not exist[Batch.tfOnlyOne]
  61. Test Batch with account does not exist[Batch.tfUntilFailure]
  62. Test Batch with account does not exist[Batch.tfIndependent]
  63. Test Batch with deposit auth on account[Batch.tfAllOrNothing]
  64. Test Batch with deposit auth on account[Batch.tfOnlyOne]
  65. Test Batch with deposit auth on account[Batch.tfUntilFailure]
  66. Test Batch with deposit auth on account[Batch.tfIndependent]
  67. Test Batch with master key disabled on account[Batch.tfAllOrNothing]
  68. Test Batch with master key disabled on account[Batch.tfOnlyOne]
  69. Test Batch with master key disabled on account[Batch.tfUntilFailure]
  70. Test Batch with master key disabled on account[Batch.tfIndependent]
  71. Test Batch all payments with destination account not funded[Batch.tfAllOrNothing]
  72. Test Batch all payments with destination account not funded[Batch.tfOnlyOne]
  73. Test Batch all payments with destination account not funded[Batch.tfUntilFailure]
  74. Test Batch all payments with destination account not funded[Batch.tfIndependent]

Pending Tests

TODO: Batch transaction with MPT as inner transactions

Top comments (0)