Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make lab environment to reliably test substrate chain scenarios #16

Closed
1 task
serapath opened this issue Feb 10, 2020 · 0 comments
Closed
1 task

make lab environment to reliably test substrate chain scenarios #16

serapath opened this issue Feb 10, 2020 · 0 comments

Comments

@serapath
Copy link
Member

@todo

  • turn little tests and experiments which involve multiple "nodes" into proper tests inside a lab

TESTING STRATEGY

  1. pull real data from dat to have test data
  2. submit it to substrate
  3. to verify

TESTING

  • set up testing environment to spin up 1+ tests and run them

  • GOAL put our "specification" into code

  • STRATEGY:

    • use transaction-factory in substrate
    • use maybe tape to write node tests
    • write everything as "integration tests" from JS side

CURRENT PRACTICE:

  • you usually don't spin up an entire node to run tests,
    just the parts of the node you need (storage, wasm executor, etc.)and then call into their apis

GOAL:

  • how to spawn 1+ datdot nodes
    • => execute transactions in controleld way
    • => check if everything went as expected
    • => and is repeatable
  1. have integration tests where we can spin up

  2. multiple substrate nodes on different platforms and see if they

  3. connect to each other and work in expected ways.

  4. If people will install datdot on windows, linux, macosx

  5. some maybe rip out the internals to run it on servers

  • and avoid the electron app
  1. ...and who knows if somebody makes it work on mobile OS's

GOAL:

  1. so, having a way to spin up all those different OS in the cloud
  2. and install datdot and connect and test to reproduce problems which might occur in practice later on

TEST SCENARIO 0

  1. use forceRegistering to check basic logic

TEST SCENARIO 1

  1. register seeders
  2. register data
  3. log usersStorage and datHosters

JOSHUAS REMARK:
just grepping the codebase for node_testing to see how it's being used
but there are some really good benchmarks and tests in node/executor
I think I'll adapt them for our module and just use that
just discovered they can give is the concrete block size info you wanted

JOSHUAS COMMENT: (NOVEMBER 13th)
there are some testing scaffolding and you can test runtime functions individually,
for example writing integration tests by calling RPC via rust,
but presetting state and simulating interactions is not super easy.

  • there are no network testing tools to easily writing some scenarios and executing a quick simulation like:
    • spawn a bunch of substrate nodes
    • pre-configure state
    • and then execute a fixed set of transactions to simulate what happens
    • to then run some assertions against the state after the state transition
@serapath serapath mentioned this issue Feb 10, 2020
28 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants