cosmos-sdk/tests/systemtests
2024-08-19 15:46:41 +00:00
..
.gitignore chore: move systemtests to tests folder (#20290) 2024-05-06 13:52:26 +00:00
account_test.go fix(systemtests): Fix account creation test to wait for TX committed (backport #21149) (#21157) 2024-08-02 06:53:56 +00:00
cli.go refactor: remove x/exp dep (backport #21281) (#21358) 2024-08-19 15:46:41 +00:00
fraud_test.go chore(systemtests): better support for app v2 (backport #21128) (#21160) 2024-08-02 12:46:46 +02:00
genesis_io.go chore: move systemtests to tests folder (#20290) 2024-05-06 13:52:26 +00:00
go.mod refactor: remove x/exp dep (backport #21281) (#21358) 2024-08-19 15:46:41 +00:00
go.sum refactor: remove x/exp dep (backport #21281) (#21358) 2024-08-19 15:46:41 +00:00
main_test.go chore: move systemtests to tests folder (#20290) 2024-05-06 13:52:26 +00:00
Makefile chore(systemtests): better support for app v2 (backport #21128) (#21160) 2024-08-02 12:46:46 +02:00
node_utils.go test(systemtests): Add double signing test (backport #21115) (#21143) 2024-08-01 11:54:06 +02:00
README.md chore: add test for account creation (backport #21053) (#21066) 2024-07-25 06:35:54 +00:00
rpc_client.go chore: move systemtests to tests folder (#20290) 2024-05-06 13:52:26 +00:00
staking_test.go chore: move systemtests to tests folder (#20290) 2024-05-06 13:52:26 +00:00
system.go refactor: remove x/exp dep (backport #21281) (#21358) 2024-08-19 15:46:41 +00:00
test_runner.go chore: move systemtests to tests folder (#20290) 2024-05-06 13:52:26 +00:00
testnet_init.go chore(systemtests): better support for app v2 (backport #21128) (#21160) 2024-08-02 12:46:46 +02:00
unordered_tx_test.go feat(tx)!: make timeout_height time based (backport #20870) (#21104) 2024-07-29 14:21:00 +02:00
upgrade_test.go chore(systemtests): better support for app v2 (backport #21128) (#21160) 2024-08-02 12:46:46 +02: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.