Android上的Cordova / Phonegap Webview自动测试 [英] Automatic Testing for Cordova/Phonegap Webview on Android

查看:433
本文介绍了Android上的Cordova / Phonegap Webview自动测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在寻找一种自动测试Android应用程式,内建Android应用程式以及混合Cordova / Phonegap应用程式的解决方案。



Google自动化工具相当精细,但不能处理WebViews,这使它不能使用我。
然后我发现了基于Selenium的有前途的自动化框架


I'm currently looking for a solution to test Android Apps automatically, native Android apps as well as hybrid Cordova/Phonegap apps.

The UI Automator from Google looks pretty fine, but can not deal with WebViews, which makes it unusable for me. Then I found the promising automation framework Appium based on Selenium, which should also be able to deal with hybrid apps, but I couldn't get it to work with WebViews, it seems to not be implemented fully yet, as also several posts prove.

After trying Appium I found a hint for Selendroid, that also should work for hybrid apps, but it seems pretty much buggy and keeps crashing my whole computer all the time.

So, does anyone here know a working solution for testing Android Apps with WebViews? I'm working on Windows 7. Thanks a lot in advance for any help.

解决方案

In first case we need to know what kind of tests you like to drive. I think you like to run functional tests on the UI? Thats what i can think about after reading your question.

So lets split this by the given environment:

native iOS

native Android

native Web like phonegap/cordova Apps

native X - The out of the Box solution for all Platforms

  • Here we are. There is none atm. But .. footage is that one here:

Gappium based on appium uses json for writing your tests. As i get the thread right, it was testet with Web/iOS for this moment. Android/Win seems not be integrated for this moment:

https://github.com/appium/io.appium.gappium.sampleapp

Note for phonegap & apache cordova functional tests:

Its possible to use ripple and selenium for testing hybrid apps. Keep in mind that some native function/plugins (hehe native functions on hybrid apps ... =) cant be tested or need to be mocked on a unknown way. Thats the footage for this moment.

Maybe usefull for you Continous Integration Server:

https://github.com/linslin/PHPUnit-selenium-HTMLGallery

这篇关于Android上的Cordova / Phonegap Webview自动测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆