#2 楼 @seveniruby 嗯 也好 现在工具确实不稳定,如果能解决这个问题,确实能解决最大的痛点
录制工具针对性很强,如果要做的话,需要 android,ios 方面的专家。
测试框架适用性比较广,我认为 appium 这种算是比较底层的框架,现在缺的是一种比较高层的框架,可以收集用例执行信息、用例的调度执行,输入数据传入,案例间参数的传递等等。
如果要搞小而美的,我建议还是做 appium 类似的工具(现有的工具坑太多)吧或者录制工具也成
给你 32 个赞
赞~给了一条扩展 uiautomator 的明路
建议将你改完的代码再贴出来
支持~
1.数据校验,UI 截图都要有 ,最好组织成测试报告,以便分析结果。至于 UI 界面对比这个我没接触过,但有人确实这么做
2.失败后应当截图,也应当记录失败原因
失败原因有两类,脚本有误抛出了异常,另一种是业务功能确实有问题
用例失败了,当然要继续执行下面的,否则自动化就没有效率可言了
这个 app 路径指的是 appium server 所在 PC 机的路径,而不是设备中的路径
@seveniruby 群名 umbrella1978,在测试行业 4 年了,web 自动化已经有一年了,有独立开发 java+selenium+jenkins 的自动化框架经验,当前正在探索移动自动化测试,同时也对新的技术 ruby 产生了兴趣,希望可以得到您的指点~QQ:575994989,公司:北京慧铭软件(创业公司)
appiumdriver 提供了方法
public class AppiumDriver extends RemoteWebDriver implements MobileDriver, ContextAware, Rotatable, FindsByIosUIAutomation,
FindsByAndroidUIAutomator, FindsByAccessibilityId{
........
/**
* Hides the keyboard if it is showing.
* On iOS, there are multiple strategies for hiding the keyboard. Defaults to the "tapOutside" strategy (taps outside the keyboard).
* Switch to using hideKeyboard(HideKeyboardStrategy.PRESS_KEY, "Done") if this doesn't work.
*/
public void hideKeyboard() {
execute(HIDE_KEYBOARD);
}
/**
* Hides the keyboard if it is showing. Available strategies are PRESS_KEY and TAP_OUTSIDE.
* One taps outside the keyboard, the other presses a key of your choosing (probably the 'Done' key).
* Hiding the keyboard often depends on the way an app is implemented, no single strategy always works.
*
* These parameters are only for iOS, and ignored by Android.
*
* @param strategy HideKeyboardStrategy
* @param keyName a String, representing the text displayed on the button of the keyboard you want to press. For example: "Done"
*/
public void hideKeyboard(String strategy, String keyName) {
ImmutableMap<String, String> parameters = ImmutableMap.of("strategy", strategy);
if (keyName != null) {
parameters = parameters.of("key", keyName);
}
........
}
先确定 你编译成功了没有,编译成了的话 去 target 目录下看看有没有 class 文件
为何不直接用 maven 引用 appium java-client?
GroupId:io.appium
ArtifactId:java-client
Version:1.5.0
要到项目目录下执行 mvn 命令,你这在/Users/unfeiyang 下执行,肯定找不到 pom 文件啊
真实要啥来啥~最近正好要测 webservice~赞
学习了
这个进程不会自己关闭的 要用 webdriver 中的 quit 方法
赞~,下载来试用下,一直为模拟器的事情郁闷
#7 楼 @vincent 如果必须使用 selendroid 模式的话,那就得设置 app 的路径。
就怕没有变化,这次 log 中有变化了,看起来只剩下
debug: Error: Required platform doesn't exist (API level >= 17)
这个报错了,你是将 android sdk 的环境变量设置为低于 17 的版本了吗,你本机安装的 sdk 版本是多少?
info: Welcome to Appium v1.2.0 (REV e53f49c706a25242e66d36685c268b599cc18da5)
ERROR: debug: Non-default server args: {"address":"127.0.0.1","logNoColors":true,"platformName":"Android","platformVersion":"16","automationName":"Selendroid"}
info: Appium REST http interface listener started on 127.0.0.1:4723
这里显示 appium 启动时,使用的 android sdk 的 platformVersion 为 16,说明环境变量里设置的 sdk 路径是 16 的路径,确实没有达到 api level >= 17 的要求