-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update Makefile and others * update README.md --------- Co-authored-by: xueyanli <[email protected]>
- Loading branch information
1 parent
1cbfa4f
commit 1e541ff
Showing
3 changed files
with
56 additions
and
32 deletions.
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
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,16 @@ | ||
prepare: | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
echo "install ckb" | ||
python -m download | ||
echo "install ckb cli" | ||
sh prepare.sh | ||
|
||
test: | ||
python -m pytest | ||
|
||
clean: | ||
rm -rf tmp | ||
rm -rf download | ||
rm -rf report | ||
rm -rf source/ckb-cli |
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 |
---|---|---|
@@ -1,32 +1,37 @@ | ||
## CKB Test | ||
|
||
### prepare | ||
download ckb | ||
```shell | ||
pip install -r requirements.txt | ||
python -m download | ||
sh prepare.sh | ||
``` | ||
### run | ||
run single test | ||
```shell | ||
python -m pytest test_cases/framework/test_01_node.py | ||
``` | ||
# ckb-py-integration-test | ||
|
||
ckb-py-integration-test is a project that uses Python for integrated testing. The goal is to automate the testing of operations on the CKB chain. | ||
|
||
## Dependencies | ||
|
||
This project requires Python and pip to be installed on your system. The Python libraries needed for this project are listed in `requirements.txt`. You can install them by running the following command: | ||
|
||
make prepare | ||
|
||
This `prepare` command will perform the following operations: | ||
|
||
1. Install the Python libraries listed in `requirements.txt`. | ||
2. Download and install the ckb binary. | ||
3. Download and install the ckb-cli. | ||
|
||
In addition, we also provide the following commands: | ||
|
||
- To run the tests for the project: | ||
|
||
make test | ||
|
||
- To clean up temporary files and other generated project files: | ||
|
||
make clean | ||
|
||
## Debugging | ||
|
||
You can add debug logging for pytest by modifying the [pytest.ini](pytest.ini) file: | ||
|
||
### debug | ||
[pytest.ini](pytest.ini) add pytest debug log | ||
```angular2html | ||
addopts = -s | ||
``` | ||
|
||
### add new test | ||
- test_cases/example/test_01_demo.py | ||
- test_cases/example/test_02_fixture_demo.py | ||
|
||
## Contributing | ||
|
||
## todo | ||
- ckb-cli support | ||
- test with ckb build | ||
- ckb rpc support | ||
- ckb contract support | ||
- etc.. | ||
If you want to contribute to this project, you can fork this repository, create a feature branch, and send us a Pull Request. For more information, please see the CONTRIBUTING.md file. |