dl_cms
test framework powered by pytest
common文件夹,可放置跨项目的通用型脚本,作为共享目的test文件夹,每个项目独立一份子文件夹(可嵌套多层),DEMO项目子文件夹的内部结构如下
basic struct
- config
全局配置 host 、db、log
- data
用例数据,如输入参数、参数模板(针对复杂参数使用)、其他数据(image、export、cookies)
每个参数的有效用例和无效用例可分开编写,会按照一定方式组合为param_list
- test_suits
用例编写(1、读取参数列表 2、调用interface对象 3、结果处理 4、断言 )
- demo.py
化所有待测接口为对象 (名称为自己的项目名称)
- run.py
按需执行用例计划,生成报告
write testcase step
前提条件
-
测试用例(单个接口的详细的入参和出参设计,多个接口的调用依赖流程)
-
data,准备每个接口的测试数据(eg. cookies、input_loads)
步骤
-
config,修改host、db
-
demo.py, 修改文件名,封装待测接口
-
test_suits/conftest.py (可选)
通常,需准备测试环境的脚本(setup、teardown)
特殊地,需二次格式化参数,二次格式化输出,以及复杂断言的脚本
- test_suits/test_xx.py
调用接口和conftest.py, 编写用例
- suit/run.py (可选)
定义要执行的接口测试,运行即自动产生测试报告
对接自动化测试平台
-
在平台上新建项目,输入git地址、项目路径(以tests目录为基准的相对路径, 如DEMO就是demo项目的路径)
-
在平台上导入用例,选择用例执行即可
Metadata
Release files for pylong 0.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pylong-0.0.0.tar.gz | 35.3 kB | Without provenance | Details for pylong-0.0.0.tar.gz |
Release files / pylong-0.0.0.tar.gz
| Download URL | pylong-0.0.0.tar.gz |
|---|---|
| Size | 35.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b492fbd5f05f99d3e8456c4ea2a0bb6cb71e1631458ef6e30193fe18afb3ef0
|
|
BLAKE2b-256 checksum How to use checksums |
5e913ade802667a84de6c6844fcad9d1e78796032587fe34c52bea3d60c1b870
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9
|
Security for pylong 0.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.