airrun
致力于简单快速的在 Android 设备上运行 airtest,减少在构建用例、获取性能监控、日志获取方面的复杂度,
并提基于 airtest 报告的新的报告生成工具,让测试人员更专注于编写测试用例。
- Python Version >= 3.6
介绍
- 用例分层和封装
- 模板封装
- 执行时区分用例
- 监控 cpu、memory 信息
- 输出图表
- 统计信息图表
- 重写 log 手机
- 重写报告生成
安装
- pip install airrun
pip install --upgrade airrun
使用
python -m airrun
version show version and exit
run run script
info get & print author/title/desc info of script
report generate report of script
参数
支持 run 方法
python run --package=com.tencent.mm --device=yourdevice
用例编写
查看 testcase 目录
| name | desc | remark |
|---|---|---|
| config | 本地配置 | |
| pages/resource | 存放 资源文件 | |
| page/*.py | 具体的页面信息 | |
| main.py | 默认运行的 script 文件 | |
| test_1.py | 给出的测试用例文件 |
- 添加用例
import logging
from airtest.core.api import *
from airrun.common.marks import airrun_setup
from testcase.config.config import LocalSetting
from testcase.pages import main_page_template
logger = logging.getLogger(__name__)
__author__ = "mengwei"
__title__ = "Case 1"
__desc__ = """
DEMO
"""
# 1 使用 airrun_setup 时,要传入测试的 package,测试的名称,全局不能重复
@airrun_setup(package_name=LocalSetting.APP_PACKAGE_NAME, test_name="test_1", login_func=None)
def test_1():
start_app(LocalSetting.APP_PACKAGE_NAME)
time.sleep(5)
main_page_template.dao_hang_template.tmplt_wo_de.assert_exists()
main_page_template.dao_hang_template.tmplt_wo_de.click()
分层
编写
报告生成
基于 airtest 的报告生成,增加了每个用例的信息和全局的信息,支持自定义添加
基于设备的报告
Metadata
Release files for airrun 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| airrun-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for airrun-0.0.2-py3-none-any.whl |
Release files / airrun-0.0.2-py3-none-any.whl
| Download URL | airrun-0.0.2-py3-none-any.whl |
|---|---|
| Size | 5.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
be19f84e05920ca577dc63af6188a522d2f3db742fc76cd0936ff413431dc592
|
|
BLAKE2b-256 checksum How to use checksums |
fc9587997ba82740a4b7511136be48acf3dc5ddebf75f67c9db850e16155b655
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3
|
Security for airrun 0.0.2
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.