-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(systemtests): Extract system test framework #22578
Merged
Merged
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
02b0019
Extract system test framework; minor refactorings
alpe 1576df5
Merge branch 'main' into alex/systemtests_pkg
alpe 9fe3682
Merge branch 'main' into alex/systemtests_pkg
alpe dc30084
Review feedback
alpe 293ab4f
Merge branch 'main' into alex/systemtests_pkg
alpe adc530e
Cleanup
alpe 1ca3a7a
Better readme
alpe 838faad
Merge branch 'main' into alex/systemtests_pkg
alpe 80a4803
Add changelog to systemtest framework
alpe d0442ef
Merge branch 'main' into alex/systemtests_pkg
alpe 4c41f88
add to go work example
tac0turtle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# 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.md](../tests/systemtests/getting_started.md) guide to get started. | ||
|
||
### Execute a single test | ||
|
||
```sh | ||
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 | ||
|
||
* [gjson query syntax](https://github.com/tidwall/gjson#path-syntax) | ||
|
||
## Disclaimer | ||
|
||
This is based on the system test framework in [wasmd](https://github.com/CosmWasm/wasmd) built by Confio. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a CHANGELOG.md under this package as well (same templates as the other changelogs)