Lisk-sdk: Functional tests rewrite

Created on 20 Jul 2017  路  3Comments  路  Source: LiskHQ/lisk-sdk

With the new _Websocket peer protocol_ and the incoming API refactoring, it is time to create a cleaner testsuite for functional tests.

  • First, we set the next tree folder:
.
+-- test
|   +-- functional
|   |   +-- http
|   |   |   +-- get
|   |   |   +-- post
|   |   +-- ws
  • Second, we move the current test/api/transport/ files to test/functional/ws/.

  • Third, we move the current test/api/ files to test/functional/http/get/ and we review them in order to leave an skeleton sign for the uncovered parts.

  • Fourth, we separate post tests from those files, grouping them per transaction type in files placed onto test/functional/http/post/ folder. Each of them will follow the next workflow template:

    1. Schema validations
    2. Transactions processing
    3. Unconfirmed state
    4. Confirmation:

      • Before new block

      • After new block

    5. Validation
    6. Confirm validation

Due to its extensive nature, we create a task list which will lead to several pull request to solve the whole issue:


test/functional/http/get/

  • [x] accounts GET #824
  • [x] blocks GET PR #887
  • [x] dapps GET
  • [x] delegates GET #830
  • [x] Remove loader GET #937
  • [x] multisignatures GET #846
  • [x] peers GET #925 @nazarhussain
  • [x] transactions #822

test/functional/http/post/

  • [x] Ground PR #807
  • [x] 0.tx POST #822
  • [x] 0.tx POST with additional data #912
  • [x] 1.second.secret POST #824
  • [x] 1.X.validation/ #978
  • [x] 1.X.unconfirmed/ #1009
  • [x] 2.delegate POST #830
  • [x] 3.votes POST #835
  • [x] 4.multisig POST #846
  • [x] 4.X.validation/ POST #979
  • [ ] 4.X.unconfirmed/ #1010
  • [x] 5.dapps POST #902
  • [x] 6.dapp.inTransfer POST #935
  • [x] 7.dapp.outTransfer POST #936

test/

  • [x] New api helper to get a safe number of blocks to wait #888
  • [x] New api helper to wait for transactions to be confirmed #900

This issue follows #457 in the task list from #225.

test

Most helpful comment

I would love to get involved in this discussion as I have a lot of strong opinions about functional tests.

All 3 comments

I would love to get involved in this discussion as I have a lot of strong opinions about functional tests.

Looks like a great idea.

As discussed with Oliver, I've changed the structure of the workflow template adding the enforcing phase for types 1 and 4. On the other hand, I will add more tests in the schema phase instead of simply relaying on lisk-js. This will assure the core's api integrity to all the users even for them which won't use lisk-js.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Nazgolze picture Nazgolze  路  3Comments

slaweet picture slaweet  路  3Comments

slaweet picture slaweet  路  4Comments

ScrewchMcMuffin picture ScrewchMcMuffin  路  3Comments

karek314 picture karek314  路  3Comments