rubixchain / rubixgoplatform

GNU General Public License v3.0
8 stars 17 forks source link

Testing Framework #151

Closed arnabghose997 closed 3 months ago

arnabghose997 commented 4 months ago

Test Scripts and Scenarios

This PR intends to add scripts which tests various scenarios on Rubix Platform. Refer here for more information.

List of Test Scenarios:

  1. Shuttle Transfer (Success Case) 1.1 Generate 2 whole RBT for A 1.2 Transfer 0.5 from A to B 1.3 Transfer 1.499 from A to B 1.4 (Transfer 0.25 from B to A) * 4 1.5 Transfer 1 RBT from A to B 1.6 Generate 2 whole RBT for A 1.7 Transfer 2 RBT from A to B 1.8 Transfer 0.001 from A to B

  2. Insufficient Balance Transfer (Failure Case) 2.1 Transferring 100 RBT from A which has zero balance 2.2 Transferring 100 RBT from B which has insufficient balance

  3. Transferring 0.00000009 RBT from B which is more than allowed decimal places (Failure Case)

  4. Transferring whole, part and mix RBT from NLSS DID to BIP39 DID 4.1 Transfer 1 RBT from NLSS DID to BIP39 DID 4.2 Transfer 1.5 RBT from NLSS DID to BIP39 DID 4.3 Transfer 0.5 RBT from NLSS DID to BIP39 DID

  5. Transferring whole, part and mix RBT from BIP39 DID to NLSS DID 5.1 Transfer 0.5 RBT from NLSS DID to BIP39 DID 5.2 Transfer 1.5 RBT from NLSS DID to BIP39 DID 5.3 Transfer 1 RBT from NLSS DID to BIP39 DID

Github Actions Workflow

A new test workflow is added which runs the test script in Windows, Linux and MacOS operating systems. Quorum and Non-Quorum node logs are generated for each of them, irrespective of successful or failure workflow run.

get-peer-id CLI command

A new CLI command get-peer-id is added to get the node ID of a peer

Usage:

./rubixgoplatform get-peer-id -port <ens server port>
harirubix commented 3 months ago

Few more tests to add in next iteration

  1. Check balance of sender , receiver and quorum nodes.
  2. Attempt double spent by node
  3. Attempt double pledge by quorum
  4. Transfer a fake RBT
  5. Pledge a fake RBT