cosmos-sdk/systemtests
dependabot[bot] 74966c9c94
build(deps): Bump github.com/cometbft/cometbft from 0.38.6 to 0.38.7 (#20257)
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>
2024-05-03 08:37:10 +00:00
..
.gitignore test(system): Introduce system tests - initial version heavily inspired by wasmd (#20013) 2024-04-30 12:54:57 +00:00
cli.go test(system): Introduce system tests - initial version heavily inspired by wasmd (#20013) 2024-04-30 12:54:57 +00:00
genesis_io.go test(system): Introduce system tests - initial version heavily inspired by wasmd (#20013) 2024-04-30 12:54:57 +00:00
go.mod build(deps): Bump github.com/cometbft/cometbft from 0.38.6 to 0.38.7 (#20257) 2024-05-03 08:37:10 +00:00
go.sum build(deps): Bump github.com/cometbft/cometbft from 0.38.6 to 0.38.7 (#20257) 2024-05-03 08:37:10 +00:00
main_test.go test(system): Introduce system tests - initial version heavily inspired by wasmd (#20013) 2024-04-30 12:54:57 +00:00
Makefile test(system): Introduce system tests - initial version heavily inspired by wasmd (#20013) 2024-04-30 12:54:57 +00:00
README.md test(system): Introduce system tests - initial version heavily inspired by wasmd (#20013) 2024-04-30 12:54:57 +00:00
rpc_client.go test(system): Introduce system tests - initial version heavily inspired by wasmd (#20013) 2024-04-30 12:54:57 +00:00
staking_test.go test(system): Introduce system tests - initial version heavily inspired by wasmd (#20013) 2024-04-30 12:54:57 +00:00
system.go chore: fix spelling errors (#20236) 2024-05-02 09:13:53 +00:00
test_runner.go test(system): Introduce system tests - initial version heavily inspired by wasmd (#20013) 2024-04-30 12:54:57 +00:00
testnet_init.go test(system): Introduce system tests - initial version heavily inspired by wasmd (#20013) 2024-04-30 12:54:57 +00:00
upgrade_test.go test(system): Introduce system tests - initial version heavily inspired by wasmd (#20013) 2024-04-30 12:54:57 +00:00

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.

Execute a single test

go test -tags system_test -count=1 -v . --run TestStakeUnstake  -verbose

Test cli parameters

  • -verbose verbose output
  • -wait-time duration - time to wait for chain events (default 30s)
  • -nodes-count int - number of nodes in the cluster (default 4)

Port ranges

With n nodes:

  • 26657 - 26657+n - RPC
  • 1317 - 1317+n - API
  • 9090 - 9090+n - GRPC
  • 16656 - 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.