Skip to content

Hanlen520/Appium_Demo

 
 

Repository files navigation

简介

使用appium+pytest+allure进行Android的UI自动化测试

环境搭建

pytest框架

pip install pytest==3.7

allure报告

命令:
py.test --alluredir=reports
allure generate reports
allure generate reports --clean
allure generate --clean reports -o myreport
用火狐浏览器打开,chrome会404

appium官方文档

capability设置 https://appium.io/docs/en/writing-running-appium/caps/

运行命令

测试单个方法: pytest -k test_home_search --alluredir=reports -s
测试单个用例:pytest -s testcase/test_find.py
测试PO级Case: pytest -v -m "P0" --alluredir=reports
不测试PO级Case: pytest -v -m "not P0" --alluredir=reports

生成报告

allure generate --clean reports -o myreport

参考文档

pytest-html
https://www.cnblogs.com/landhu/p/7463631.html

pytest-html
https://blog.csdn.net/liuchunming033/article/details/79624474

Python中的单例模式
http://funhacks.net/2017/01/17/singleton/

About

Demo for Test Appium

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 76.9%
  • JavaScript 21.6%
  • CSS 1.1%
  • HTML 0.4%