| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| inputfiles/ | 06-May-2025 | - | 1,036 | 1,030 | ||
| outputfiles/ | 06-May-2025 | - | ||||
| reports/assets/ | 06-May-2025 | - | 319 | 290 | ||
| testReliability/ | 06-May-2025 | - | 338 | 263 | ||
| testRoot/ | 06-May-2025 | - | 2,408 | 1,837 | ||
| testUser/ | 06-May-2025 | - | 168 | 137 | ||
| tools/ | 06-May-2025 | - | 87 | 56 | ||
| main.py | D | 06-May-2025 | 1.9 KiB | 53 | 31 | |
| prepare.py | D | 06-May-2025 | 977 | 26 | 8 | |
| pytest.ini | D | 06-May-2025 | 484 | 21 | 19 | |
| readme.md | D | 06-May-2025 | 1 KiB | 29 | 22 | |
| requirements.txt | D | 06-May-2025 | 97 | 8 | 7 |
readme.md
1# pytest命令行参数 2-s: 显示输出调试信息,包括print打印的信息 3-v: 显示更详细的信息 4-n:支持多线程运行脚本(需要保持用例彼此独立) 5--reruns NUM:失败用例重跑次数 6-x:表示只要有一个用例报错,那么测试停止 7-k:模糊匹配字符串进行用例跑测 8 9 10## 测试用例执行 11前置条件: 121. 将onebox中的trace_streamer_nativehook.exe, process_resource_limit.json放入inputfiles文件夹 132. 打开并运行onebox中的profiler-test和network-profiler-test这两个IDE工程 143. 将所有的 "text=True"替换为"shell=True, text=True" 15 16 17windows环境下执行测试用例 181. Root组用例: 19设备进入root模式,进入scripts/testRoot目录,命令行执行 pytest ./ 20 212. User组用例: 22进入华为商城,下载QQ浏览器 23设备进入User模式,进入scripts/testUser目录,命令行执行 pytest ./ 24 253. 稳定性用例: 26进入scripts/tesReliability目录,命令行执行 pytest ./ 27 28## 测试报告 29执行用例后,会在reports目录下生成测试报告