应用程序的自动化测试

应用程序的自动化测试

本文介绍了PhoneGap/Cordova 应用程序的自动化测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我想对 PhoneGap 应用执行自动化测试(目前仅在 iOS 上),我有哪些选项(如果有)?

If I want to perform automated testing of a PhoneGap app (for now, only on iOS), what options do I have (if any)?

Selenium 本来是我的第一个电话,但是 你能使用 Selenium使用 phonegap 应用程序? 表明这是不可能的.看起来有一个 iPhone 驱动程序可以在 iOS 上运行 Selenium,但没有说明如何使其与 PhoneGap 交互.旧的 PhoneGap wiki 似乎暗示这是可能的但并没有真正说明如何.

Selenium would have been my first call, but Can you use Selenium with a phonegap application? suggests that's not possible. It looks like there's an iPhone driver to run Selenium on iOS, but no indication how to make that interact with PhoneGap. The old PhoneGap wiki seems to imply that it's possible but doesn't really say how.

我也曾研究过将 Jasmine 与 Jasmine-jQuery 插件一起使用,但它需要复制应用程序 HTML(以及保持两者同步的开销等).

I had also looked at using Jasmine with the Jasmine-jQuery plugin for much the same thing but it requires duplicating the app HTML (and the overhead of keeping the two in sync etc).

推荐答案

目前无法将 Selenium/WebDriver 与 PhoneGap/Cordova Android 一起使用.我们确实曾经在某个版本的 WebDriver 上工作过,但是我一直无法让当前版本的 WebDriver 客户端与自定义 WebView 一起工作,例如 Cordova/PhoneGap Android 所基于的 CordovaWebView.我们仍在尝试弄清楚如何让新代码与自定义 Web 视图很好地配合使用,因为目前还没有这方面的文档.

Using Selenium/WebDriver with PhoneGap/Cordova Android is currently not possible. We did have this working at one point with a certain version of WebDriver, but I have been having trouble getting the current version of the WebDriver client working with custom WebViews such as the CordovaWebView, which Cordova/PhoneGap Android is based on. We are still trying to figure out how to get the new code to work nicely with custom web views, since there's no documentation for this so far.

因此,遗憾的是,这个问题的答案是还没有,但我们正在尝试".

So, sadly, the answer for this one is "not yet, but we're trying".

这篇关于PhoneGap/Cordova 应用程序的自动化测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 08:27