简介
在教程1已经完成Appium安装,接下来我们完成App录制脚本,并生成测试报告
1.录制脚本




2.生成报告
这里使用我已经搭建好的框架:App-autotest(链接: https://pan.baidu.com/s/11y-IyZPVbekUr-aHtYb_kQ 密码: fyyi)
我们选择脚本语言为Python,用HtmlTestRunner配合生成报告,这之前要按照node.js
安装Homebrew:/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
安装python3:brew install python3
安装HtmlTestRunner:https://github.com/oldani/HtmlTestRunner

进入测试项目runner目录,输入python runner.py

测试报告

后续给框架加上截图,报表统计。
1.TabError: Inconsistent use of tabs and spaces in indentation
解决:把Tab都换成空格就好
HtmlTestRunner模板目录:
/usr/local/lib/python3.6/site-packages/HtmlTestRunner/template
网友评论