wasmd/tests/system
pinosu 6a2bffd479
Add grant system tests (#1626)
* Add grant system tests

* Add unpermissioned chain test case

* Fix tests

* Update cli and fix feedbacks

* Revisit CLI and system tests (#1627)

* Restructure CLI; fix system test

* Review feedback

---------

Co-authored-by: Alexander Peters <alpe@users.noreply.github.com>
2023-09-15 16:59:27 +02:00
..
testdata Start system tests (#1410) 2023-06-15 16:55:33 +02:00
.gitignore Start system tests (#1410) 2023-06-15 16:55:33 +02:00
Makefile Remove dependency to wasmd in system tests 2023-07-06 11:30:07 +00:00
README.md Start system tests (#1410) 2023-06-15 16:55:33 +02:00
basic_test.go Start system tests (#1410) 2023-06-15 16:55:33 +02:00
cli.go Add grant system tests (#1626) 2023-09-15 16:59:27 +02:00
cli_test.go Make system tests extendable for other app binaries 2023-07-14 15:41:46 +02:00
fraud_test.go Add grant system tests (#1626) 2023-09-15 16:59:27 +02:00
genesis_io.go Add grant system tests (#1626) 2023-09-15 16:59:27 +02:00
go.mod Bump cosmos-sdk to v0.47.5 2023-09-04 16:38:02 +02:00
go.sum Bump cosmos-sdk to v0.47.5 2023-09-04 16:38:02 +02:00
main_test.go Make system tests extendable for other app binaries 2023-07-14 15:41:46 +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 Start system tests (#1410) 2023-06-15 16:55:33 +02:00
system.go Bump SDK to v0.47.4 2023-07-20 10:07:23 +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!