cosmos-sdk/systemtests
Alvarez d201ca9ae4
docs: fix typos and wording across SDK documentation READMEs (#25696)
Co-authored-by: Alex | Cosmos Labs <alex@cosmoslabs.io>
2025-12-17 17:12:11 +00:00
..
CHANGELOG.md chore: prep release for systemtest v1.3.0 (#24968) 2025-07-23 18:41:04 +00:00
cli.go refactor(client): change flag for unordered tx timeouts (#24561) 2025-04-24 14:22:06 -04:00
genesis_io.go test: add systemtests (#23686) 2025-02-14 17:27:03 -05:00
GETTING_STARTED.md chore: prep systemstest (#24514) 2025-04-14 21:43:50 +00:00
go.mod build(deps): Bump go.opentelemetry.io/contrib/propagators/jaeger from 1.37.0 to 1.39.0 (#25682) 2025-12-17 15:00:43 +00:00
go.sum build(deps): Bump go.opentelemetry.io/contrib/propagators/jaeger from 1.37.0 to 1.39.0 (#25682) 2025-12-17 15:00:43 +00:00
io_utils.go test: add systemtests (#23686) 2025-02-14 17:27:03 -05:00
node_utils.go refactor: bring cometbft back to v0.38.x family (#25285) 2025-08-29 15:58:04 -04:00
README.md docs: fix typos and wording across SDK documentation READMEs (#25696) 2025-12-17 17:12:11 +00:00
rest_support.go test: add systemtests (#23686) 2025-02-14 17:27:03 -05:00
rpc_client.go refactor: bring cometbft back to v0.38.x family (#25285) 2025-08-29 15:58:04 -04:00
system.go feat(systemtests): setup chain with more args (#25369) 2025-10-08 18:50:46 +00:00
test_runner.go feat(systemtest): allow chainID to be configured (#24962) 2025-07-22 23:01:22 +00:00
testnet_init.go feat(systemtests): setup chain with more args (#25369) 2025-10-08 18:50:46 +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 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.