wasmd/tests/system
James Niken e923c880db
replace dead cosmos links to system.go (#2265)
2025-05-21 08:43:45 +02:00
..
testdata Start system tests (#1410) 2023-06-15 16:55:33 +02:00
.gitignore Add system tests for chain upgrade (#1643) 2023-10-13 14:16:31 +02:00
Makefile Add system tests for chain upgrade (#1643) 2023-10-13 14:16:31 +02:00
README.md Start system tests (#1410) 2023-06-15 16:55:33 +02:00
basic_test.go Add system tests for chain upgrade (#1643) 2023-10-13 14:16:31 +02:00
cli.go refactor: replace golang.org/x/exp with stdlib (#2148) 2025-03-19 15:51:55 +01:00
cli_test.go Add system tests for chain upgrade (#1643) 2023-10-13 14:16:31 +02:00
fraud_test.go Add system tests for chain upgrade (#1643) 2023-10-13 14:16:31 +02:00
genesis_io.go Add system tests for chain upgrade (#1643) 2023-10-13 14:16:31 +02:00
go.mod chore(deps): bump golang.org/x/net in /tests/system (#2222) 2025-04-18 12:05:32 +02:00
go.sum chore(deps): bump golang.org/x/net in /tests/system (#2222) 2025-04-18 12:05:32 +02:00
main_test.go Add system tests for chain upgrade (#1643) 2023-10-13 14:16:31 +02:00
permissioned_test.go Add grant system tests (#1626) 2023-09-15 16:59:27 +02:00
rpc_client.go Start system tests (#1410) 2023-06-15 16:55:33 +02:00
staking_test.go Add system tests for chain upgrade (#1643) 2023-10-13 14:16:31 +02:00
system.go replace dead cosmos links to system.go (#2265) 2025-05-21 08:43:45 +02:00
upgrade_test.go Add system tests for chain upgrade (#1643) 2023-10-13 14:16:31 +02:00

README.md

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 ./testing --run TestSmokeTest  -verbose
  • Force a binary rebuild before running the test
go test -tags system_test -count=1 -v ./testing --run TestSmokeTest  -verbose -rebuild

Test cli parameters

  • -verbose verbose output
  • -rebuild - rebuild artifacts
  • -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

The initial code was contributed from the Tgrade project. The idea was inspired by the work of the e-money team on their system tests. Thank you!