Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Julien Robert <julien@rbrt.fr> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| account_test.go | ||
| bank_test.go | ||
| cli.go | ||
| fraud_test.go | ||
| genesis_io.go | ||
| getting_started.md | ||
| go.mod | ||
| go.sum | ||
| main_test.go | ||
| Makefile | ||
| node_utils.go | ||
| README.md | ||
| rpc_client.go | ||
| staking_test.go | ||
| system.go | ||
| test_runner.go | ||
| testnet_init.go | ||
| unordered_tx_test.go | ||
| upgrade_test.go | ||
Testing
Test framework for system tests. Starts and interacts with a (multi node) blockchain in Go. Supports
- CLI
- Servers
- Events
- RPC
Uses:
- testify
- gjson
- sjson
Server and client side are executed on the host machine.
Developer
Test strategy
System tests cover the full stack via cli and a running (multi node) network. They are more expensive (in terms of time/ cpu) to run compared to unit or integration tests. Therefore, we focus on the critical path and do not cover every condition.
How to use
Read the getting_started.md guide to get started.
Execute a single test
go test -tags system_test -count=1 -v . --run TestStakeUnstake -verbose
Test cli parameters
-verboseverbose output-wait-timeduration - time to wait for chain events (default 30s)-nodes-countint - number of nodes in the cluster (default 4)
Port ranges
With n nodes:
26657-26657+n- RPC1317-1317+n- API9090-9090+n- GRPC16656-16656+n- P2P
For example Node 3 listens on 26660 for RPC calls
Resources
Disclaimer
This is based on the system test framework in wasmd built by Confio.