cosmos-sdk/systemtests
dependabot[bot] a03c90beb2
build(deps): Bump google.golang.org/grpc from 1.69.2 to 1.69.4 (#23389)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alex | Interchain Labs <alex@skip.money>
2025-01-15 21:23:22 +00:00
..
CHANGELOG.md test: investigate test failure due to wal log (#22679) 2024-12-19 15:00:37 +00:00
cli.go build(deps): bump cometbft to v1.0.0-rc2 (#22577) 2024-11-28 11:33:27 +00:00
genesis_io.go refactor(systemtests): Extract system test framework (#22578) 2024-11-26 14:46:54 +00:00
getting_started.md docs: fix multiple typos (#23143) 2025-01-02 11:59:18 +00:00
go.mod build(deps): Bump google.golang.org/grpc from 1.69.2 to 1.69.4 (#23389) 2025-01-15 21:23:22 +00:00
go.sum build(deps): Bump google.golang.org/grpc from 1.69.2 to 1.69.4 (#23389) 2025-01-15 21:23:22 +00:00
io_utils.go refactor(systemtests): Extract system test framework (#22578) 2024-11-26 14:46:54 +00:00
node_utils.go refactor(systemtests): Extract system test framework (#22578) 2024-11-26 14:46:54 +00:00
README.md docs: wrong link to getting started (#22991) 2024-12-18 21:02:16 +00:00
rest_support.go test(systemtests): fix gRPC tests for v1 & v2 (#22774) 2024-12-06 11:03:12 +00:00
rpc_client.go refactor(systemtests): Extract system test framework (#22578) 2024-11-26 14:46:54 +00:00
system.go test: investigate test failure due to wal log (#22679) 2024-12-19 15:00:37 +00:00
test_runner.go refactor(systemtests): Extract system test framework (#22578) 2024-11-26 14:46:54 +00:00
testnet_init.go test: investigate test failure due to wal log (#22679) 2024-12-19 15:00:37 +00:00

System Tests

This package contains the testing framework for black-box system tests. It includes a test runner that sets up a multi-node blockchain locally for use in tests. The framework provides utilities and helpers for easy access and setup in tests.

Components

  • CLI: Command-line interface wrapper for interacting with the chain or keyring
  • Servers: Server instances to run the blockchain environment.
  • Events: Event listeners
  • RPC: Remote Procedure Call setup for communication.

Dependencies

  • testify: Testing toolkit.
  • gjson: JSON parser.
  • sjson: JSON modifier.

Server and client-side operations 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

  • -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.