-
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.
- Loading branch information
1 parent
9df5cf0
commit 7ba79ee
Showing
3 changed files
with
51 additions
and
33 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,31 @@ | ||
## 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 | ||
### debug | ||
[pytest.ini](pytest.ini) add pytest debug log | ||
```angular2html | ||
addopts = -s | ||
``` | ||
ckb-py-integration-test 是一个使用 Python 进行集成测试的项目,目标是自动化 CKB 链上操作的测试。 | ||
## 依赖 | ||
此项目需要在系统上安装 Python 和 pip。此项目所需的 Python 库在 `requirements.txt` 中列出,可以通过运行以下命令来安装: | ||
make prepare | ||
这条 `prepare` 命令将执行以下操作: | ||
### add new test | ||
- test_cases/example/test_01_demo.py | ||
- test_cases/example/test_02_fixture_demo.py | ||
1. 安装在 `requirements.txt` 中列出的 Python 库。 | ||
2. 下载并安装 ckb 二进制文件。 | ||
3. 下载并安装 ckb-cli。 | ||
此外,我们还提供了以下命令: | ||
## todo | ||
- ckb-cli support | ||
- test with ckb build | ||
- ckb rpc support | ||
- ckb contract support | ||
- etc.. | ||
- 执行项目的测试: | ||
make test | ||
- 清理临时文件和其他生成的项目文件: | ||
make clean | ||
## 参与贡献 | ||
如果你想为此项目贡献代码,你可以 fork 这个仓库,创建特性分支,并向我们发送拉取请求(Pull Request)。有关详细信息,请查看 CONTRIBUTING.md 文件。 | ||
``` |