cosmos-sdk/tests/systemtests
dependabot[bot] adf5e1ee1f
build(deps): Bump cosmossdk.io/math from 1.3.0 to 1.4.0 (#22611)
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>
2024-11-21 09:17:27 +01:00
..
testdata test: migrate e2e/tx tests to systemtest (backport #22152) (#22354) 2024-10-27 23:59:09 +01:00
.gitignore chore: move systemtests to tests folder (#20290) 2024-05-06 13:52:26 +00:00
account_test.go test: x/accounts systemtests (backport #22320) (#22338) 2024-10-23 12:31:56 +02:00
auth_test.go test(system): check feePayers signature (backport #22389) (#22390) 2024-10-28 23:41:34 +04:00
authz_test.go test: migrate e2e/distribution to system tests (backport #21908) (#22133) 2024-10-04 17:46:34 +02:00
bank_test.go chore(systemtests): Remove testutil dependency (backport #21995) (#22092) 2024-10-04 17:42:07 +02:00
circuit_test.go test: add x/circuit system tests (backport #22331) (#22355) 2024-10-24 12:05:03 +02:00
cli.go test: x/accounts systemtests (backport #22320) (#22338) 2024-10-23 12:31:56 +02:00
cometbft_client_test.go test: e2e/client to system tests (backport #21981) (#21986) 2024-10-27 23:55:50 +01:00
distribution_test.go test: migrate e2e/auth to system tests and fix sign-batch (backport #22149) (#22234) 2024-10-11 14:54:06 +02:00
export_test.go test: migrate e2e/genutil to systemtest (backport #22325) (#22366) 2024-10-25 15:58:29 +02:00
fraud_test.go chore(systemtests): Remove testutil dependency (backport #21995) (#22092) 2024-10-04 17:42:07 +02:00
genesis_io.go test(systemtest): Fix prune & gov test (backport #22190) (#22196) 2024-10-11 09:34:57 +02:00
getting_started.md test: e2e/staking to system tests (backport #21882) (#21902) 2024-09-25 07:19:46 +00:00
go.mod build(deps): Bump cosmossdk.io/math from 1.3.0 to 1.4.0 (#22611) 2024-11-21 09:17:27 +01:00
go.sum build(deps): Bump cosmossdk.io/math from 1.3.0 to 1.4.0 (#22611) 2024-11-21 09:17:27 +01:00
gov_test.go test(systemtest): Fix prune & gov test (backport #22190) (#22196) 2024-10-11 09:34:57 +02:00
group_test.go test: migrate e2e/group to system tests (backport #22278) (#22286) 2024-10-17 10:20:25 +02:00
io_utils.go chore(systemtests): Remove testutil dependency (backport #21995) (#22092) 2024-10-04 17:42:07 +02:00
main_test.go chore: move systemtests to tests folder (#20290) 2024-05-06 13:52:26 +00:00
Makefile ci: increase test-system timeout (backport #22386) (#22387) 2024-10-28 17:11:46 +04:00
mint_test.go test: migrate e2e/mint to system tests (backport #22294) (#22304) 2024-10-17 16:33:19 +02:00
node_utils.go test(systemtests): Add double signing test (backport #21115) (#21143) 2024-08-01 11:54:06 +02:00
README.md docs: system test tutorial (backport #20812) (#21553) 2024-09-05 06:58:08 +02:00
rest_cli.go test(systemtests): fix failing tests (backport #22145) (#22154) 2024-10-07 15:42:11 +02:00
rpc_client.go test: e2e/client to system tests (backport #21981) (#21986) 2024-10-27 23:55:50 +01:00
snapshots_test.go test(systemtest): Fix prune & gov test (backport #22190) (#22196) 2024-10-11 09:34:57 +02:00
staking_test.go test: e2e/staking to system tests (backport #21882) (#21902) 2024-09-25 07:19:46 +00:00
system.go test: migrate e2e/genutil to systemtest (backport #22325) (#22366) 2024-10-25 15:58:29 +02:00
test_runner.go chore: move systemtests to tests folder (#20290) 2024-05-06 13:52:26 +00:00
testnet_init.go test(systemtests): fix failing tests (backport #22145) (#22154) 2024-10-07 15:42:11 +02:00
tx_test.go test: migrate e2e/tx tests to systemtest (backport #22152) (#22354) 2024-10-27 23:59:09 +01:00
unordered_tx_test.go ci: actually enable v2 system test (backport #21539) (#21931) 2024-09-26 13:43:30 +00:00
upgrade_test.go chore: Set build tag for chain upgrade test (#22442) 2024-11-06 13:09:38 +01: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.

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.