Skip to content

Latest commit

 

History

History
88 lines (73 loc) · 4.74 KB

SendToOwners_TestReqs.md

File metadata and controls

88 lines (73 loc) · 4.74 KB

Send to Owners

Transaction Type 3: Send to Owners

Each application under test (AUT) must pass the applicable tests listed in Major Items & Scenarios To Be Tested.

The tests for Send to Owners include:

  1. user is able to enter valid values for all appropriate fields:
    • Currency identifier
    • Amount to transfer
  2. valid input data is parsed and interpreted correctly, including all valid MSC Protocol transaction types in the blockchain that are supported by the AUT
  3. erroneous input data, including a corrupted blockchain, is detected as not valid and handled correctly
  4. correct Send to Owners transactions are generated from valid test input data
  5. runtime error conditions are detected and handled correctly (e.g. insufficient funds, application/network/OS failure)
  6. all edge cases are handled correctly
  7. correct, meaningful messages reflecting transaction success/status or failure are presented to the user

For each test sequence, start in a known state and return to a known state after the test is complete. Run the tests separately and also simultaneously. The simultaneous tests should be run by the same users/addresses in the same roles where possible, and also by different users/addresses.

Where appropriate, tests should be run using the end-user UI and using the API directly.

Positive Tests - Valid

For all positive tests,

  • each step must succeed with correct results, and
  • the total number of tokens owned must be exactly the same before and after the Send to Owners transaction

Basic Send to Owners

  1. U1: Send to Owners
    • Currency Id = 1, 2, at least 2 smart properties (divis, indiv)
    • Amount to transfer <= the sender's available balance
      • For MSC & TMSC, Amount to transfer leaves enough in balance to pay transfer fee
  2. U1, U2: Confirm:
    • sending address Currency Id available balance decremented by Amount to transfer
    • sending address MSC (or TMSC) balance decremented based on number of addresses that received payment
    • correct amounts added to available balance of the correct addresses (rounding up to nearest unit, smaller owners receive 0 if Amount to transfer consumed in payments to larger owners)

Send to Owners that have reserved balances

  1. U1: Send to Owners
    • Currency Id = 1, 2, at least 2 smart properties (divis, indiv)
    • Amount to transfer <= the sender's available balance
      • For MSC & TMSC, Amount to transfer leaves enough in balance to pay transfer fee
  2. U1, U2: Confirm:
    • sending address Currency Id available balance decremented by Amount to transfer
    • sending address MSC (or TMSC) balance decremented based on number of addresses that received payment
    • correct amounts added to available balance of the correct addresses (rounding up to nearest unit, smaller owners receive 0 if Amount to transfer consumed in payments to larger owners)
      • reserved balances unchanged for all addresses involved

Only largest owner receives tokens

  1. U1: Send to Owners
    • Amount to transfer = 1 for indiv, .00000001 for divis token
    • More than 1 owner
  2. U1, U2: Confirm
    • Only largest owner receives the Amount to transfer, others receive 0
    • .00000001 MSC (or TMSC) transfer fee deducted from sender's balance

Multiple owners have same amount

  1. U1: Send to Owners
    • 3 addresses have same amount
  2. U1, U2: Confirm
    • transfer amount applied to those addresses in address alphabetical order

Negative Tests - Not Valid

The message must be detected as invalid, with no changes made to any MP balances.

Erroneous Message Field Data (each condition is individually invalid)

  1. U1: Attempt to Send to Owners:
    • currency id = 0 (bitcoin)
    • a non-existent currency id
    • available balance = 0
    • Amount to transfer > sender's available balance
    • Amount to transfer <= 0
    • insufficient MSC (or TMSC) to pay calculated transfer fee (based on number of addresses that would receive payment)
  2. U1, U2: Confirm, for each condition
    • transaction message was invalid
    • All owners' addresses still own the same number of tokens
    • 0 transfer fee deducted from sender's MSC (or TMSC) balance

Sender owns all the tokens

  1. U1: Attempt to Send to Owners:
    • Sender's address owns all the tokens
    • Amount to transfer <= sender address's balance
  2. U1, U2: Confirm
    • transaction message was invalid
    • Sender's address still owns the same number of tokens
    • 0 transfer fee deducted from sender's MSC (or TMSC) balance

The tester and developer should work together to write and run procedures that thoroughly test this functionality in the AUT.