Appium:它可以用于跨平台应用测试 [英] Appium : Can it be used for cross platform application testing
问题描述
我有一个使用跨平台开发工具开发的一个应用程序。这个程序有适用于iOS相同的接口(IPA)和Android(APK)。我可以写一个脚本自动化并在运行这两个平台,即两个Android和iOS的应用程序。
任何试图利用这个Appium?什么是需要用于开发测试脚本跨平台测试定位技术。通过标签名例如,XPath的?
什么是与appium跨平台测试的局限性?
所以,跨平台意味着煎茶权?
阙1: -
混合动力是, Appium 的支持,以及原生的iOS / Android应用程序。
自动化您可以重复使用相同的code为iOS和Android(但是把它用少许盐)。
请参阅这里 6答案
看看这个github上链接 https://github.com/appium/appium 。
2阙 -
定位元素: -
你可以使用索引,RESOURCE_ID,文本和XPath也。
1。指数: - 假设你想要得到的按钮索引。 Appium治疗特定类型的元素数组。
开始索引的计数(按钮[0],按钮 1 ...)从上到下,从左到右
在桌面端使用
uiautomatorviewer
命令(请确保您拥有所有ANDROID_HOME路径工具,平台工具集,构建工具和 ADB设备
显示所有连接的设备清单)。这将打开一个窗口,点击最右边采取截图按钮。将鼠标悬停在元素present的截图中,你将看到索引,RESOURCE_ID,文字的所有元素和XPath
限制: - Appium是点点不稳定到现在。
Android 4.2以上版本支持 uiautomatorviewer
而低版本使用 Selendroid
对于跨平台的需要根据您平台(iOS / Android)和设备版本和运行平台上的改变code 功能
。
请参阅的帮助的http://swapnilvkotwal.word$p$pss.com/2014/04/04/appium-setup-ruby-sample-test-script/
I have one application that is developed using cross platform development tool. This app has same interface for ios(ipa) and android(apk). Can I write one automation script and run it across both the platforms i.e both for android and ios app.
Anyone tried this using Appium ? What are the locating techniques that need to be used for developing test scripts for cross platform testing. e.g by tagName, xpath ?
What are the limitations with appium for cross platform testing?
So, cross platform means Sencha right?
Que 1:- Yes, Appium support to hybrid as well as native iOS/Android app.
for automation you can reuse same code for both iOS and Android(But take it with pinch of salt). Please see 6th answer here
Check out this github link https://github.com/appium/appium.
Que 2:-
Locating elements :- you can use indexes, resource_id, text, and XPath also.
1. Indexes :- Suppose you want to get index of buttons. Appium treat specific types of elements as array. Start counting of indexes(button[0],button1 ... ) from top to bottom, left to right.
- uiautomatorviewer :- connect you mobile device to desktop and launch your app.
In desktop terminal use
uiautomatorviewer
command (please make sure you have all ANDROID_HOME path set for tools, platform-tools, build-tools andadb devices
showing all attached devices list).
It will open a window, click on right most take a screenshot button. Hover on elements present on screenshot you will see all elements by indexes, resource_id, text, and XPath
limitations :- Appium is Little bit unstable till now.
Android 4.2+ supports to uiautomatorviewer
while for lower version use Selendroid
for cross platform you need to change code capabilities
based on your platform(iOS/Android) and device version and running platforms.
See blog for help http://swapnilvkotwal.wordpress.com/2014/04/04/appium-setup-ruby-sample-test-script/
这篇关于Appium:它可以用于跨平台应用测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!