Nxt :: Asset Exchange Testing
Let´s get things organized!
I´ve created a project for Nxt AE on TestPad.
https://nxt.ontestpad.comAnyone willing to test AE please join the site so I can add you to the project.
What is TestPad for and why to join?
We can
- write test cases
- run tests step-by-step
- track tests step-by-step
- track bugs
- track bugfixing progress
Please PM me your username after registration.
Edit: TestPad is charging $9/month for every new user. I will pay for the subscription from my own pocket, so please, only join if you are serious about testing.
Still looking for some candidates
WHO ARE ABLE TO WRITE TESTCASES!AE (0.8.7) looks pretty good and stable. I made following pretty "complicated" test that involves multiple characteristics of the AE order matching algorithm in one test case. If such test cases succeed, we can be pretty sure that all the simple functions involved work as intended.
The test case was the following:
3 Accounts involved, account A and B are sellers of "Peanuts", account C is a buyer of "Peanuts", they sell and buy different amounts for different prices.
Possessions before trade:
Account A: 1000 NXT, 2000 Peanuts
Account B: 500 NXT, 5000 Peanuts
Account C: 2000 NXT, 1000 Peanuts
Offers:
A makes a sell offer: 300 Peanuts, Price: 2 NXT, Fee: 1 NXT
B makes a sell offer: 200 Peanuts, Price: 1 NXT, Fee: 1 NXT
C makes a buy offer, 350 Peanuts, for 3 NXT each, Fee: 3 NXT
The AE Order matching algorithm assumes (correctly) that a buyer wants to buy as cheap as possible. So, C buys 200 Peanuts from B for 1 NXT each (200 NXT total), and 150 Peanuts from A for 2 NXT each (total 300 NXT).
Final possessions after trades:
Account A: 1000 NXT + 300 NXT - 1 NXT (fee) = 1299 NXT,
2000 Peanuts - 150 Peanuts = 1850 Peanuts
Account B: 500 NXT + 200 NXT - 1 NXT (Fee) = 699 NXT,
5000 Peanuts - 200 Peanuts = 4800 Peanuts
Account C: 2000 NXT - (200*1 NXT) - (150*2 NXT) - 3 NXT (Fee) = 1497 NXT
1000 Peanuts + 200 Peanuts + 150 Peanuts = 1350 Peanuts
And finally, there is still a sell offer active from account A about 150 Peanuts for 2 NXT each.
Additionall, the total amount of Peanuts before and after the trades must be the same:
before: 2000 + 5000 + 1000 = 8000 Peanuts
after: 1850 + 4800 + 1350 = 8000 Peanuts
Also the amount of NXT must be the same, minus the fees:
before: 1000 + 500 + 2000 = 3500 NXT
after: 1299 + 699 + 1497 = 3495 NXT (5 NXT are "lost" as fees)
This testcase succeeded!
We should do some additional similar testcases, creating also scenarios where orders are cancelled at the same time (in the same block) when they would be fulfilled