w3f / polkadot-lab

Testing framework for Polkadot networks
11 stars 10 forks source link
benchmark-framework blockchain docker helm kind kubernetes polkadot substrate terraform testing-tools

CircleCI

polkadot-lab

polkadot-lab is a testing framework for substrate-based chains. You can learn more about substrate and Polkadot here.

Goals

This project aims to:

Quick start

You only need to have NodeJS, yarn and docker installed.

$ git clone git@github.com:w3f/polkadot-lab.git
$ cd polkadot-lab
$ cp config/main.sample.yaml config/main.yaml
$ yarn
$ yarn start

This will execute an experiment running on a Polkadot v0.8.23 network composed of 4 nodes and with two test cases:

Architecture

From a high level point of view, polkadot-lab is a system that allows to run experiments on networks and retrieve results from them. There are no restrictions in terms of how the experiment should look like or which data should we obtain from them, only some conventions that define how each component comunicates with each other.

Components

Experiments

An experiment is a declarative definition of a complete polkadot-lab execution, including the network details and the test cases to run on it. It is composed of the following fields:

You can see a sample a complete example configuration here.

Test cases

TODO

Data structures

TODO

Remote Execution

We use terraform modules for creating the infrastructure required for remote executions. You should have cloud provider credentials loaded so that terraform can work, currently only GCP is supported see here for details about the general configuration. Your service account should have at least Kubernetes Engine Admin role, see here for information about how to grant this permission.

Workflow

TODO