简体   繁体   English

我们可以使用UFT 12.0自动测试.apk(Android)应用程序吗

[英]can we automate testing of .apk(Android) applications using UFT 12.0

I am testing a mobile application. 我正在测试一个移动应用程序。 Can we automate the testing of the same using HP-Unified Functional Testing Version 12.0? 我们可以使用HP统一功能测试版本12.0自动化测试吗?

For native application support (equivalent to context-sensitive support you have for desktop applications), you'll need to work with a 3rd Party Add-in like Perfecto Mobile. 为了获得本机应用程序支持(等同于桌面应用程序对上下文的支持),您需要使用Perfecto Mobile这样的第三方插件。

Otherwise, you're option is to run the application in an emulator on the desktop or use remote software to replicate the device screen on your desktop. 否则,您可以选择在桌面上的模拟器中运行该应用程序,或者使用远程软件在桌面上复制设备屏幕。 Then you'd automate it like any other windows application, but you're not going to be able to see object. 然后,您将像其他任何Windows应用程序一样将其自动化,但是您将无法看到对象。 Everything would be image-based. 一切都将基于图像。

Image-based testing is OK for very small automation tasks, but not much else. 对于非常小的自动化任务,基于图像的测试是可以的,但其他方面则不多。 Anything more complex and you'll quickly end up in a maintenance and playback reliability nightmare. 任何更复杂的事情,您都将很快陷入维护和回放可靠性的噩梦。 To do it right, you're going to need additional software that lets you interact with native objects in Android. 要正确执行此操作,您将需要其他软件来与Android中的本机对象进行交互。

Yes you can automate testing of android (apk) using UFT 12. I am currently testing an android application using UFT with a .net Add-in using real devices. 是的,您可以使用UFT 12自动测试android(apk)。我目前正在使用UFT和带有.net加载项的UFT使用真实设备测试android应用程序。 All functions were created using c# and appium in Visual studio 2013 - c#.net. 所有功能都是在Visual Studio 2013-c#.net中使用c#和appium创建的。 Then the objects are called from UFT using the .net dll. 然后使用.net dll从UFT调用对象。

Brief Example: Dim objTest, results 简要示例:Dim objTest,结果

Set objTest = DotNetFactory.CreateInstance("MyAndroidTest.MyAndroidTestClass","C:\\automation\\API\\MyAndroidTest.dll") 设置objTest = DotNetFactory.CreateInstance(“ MyAndroidTest.MyAndroidTestClass”,“ C:\\ automation \\ API \\ MyAndroidTest.dll”)

results = objTest.MyEnrollment("name","password") 结果= objTest.MyEnrollment(“名称”,“密码”)

if results = "" ....set to false else ...set to true end if if results =“” ....设置为false else ...设置为true

Do you hear about Mobile Center? 您听说过Mobile Center吗? I would suggest you to try out Mobile Center and UFT, and with latest version UFT 14.03. 我建议您尝试使用Mobile Center和UFT,以及最新版本的UFT 14.03。

It allows testing of all kinds of mobile apps, system apps, mobile browser, homemade native or hybrid app etc. 它允许测试各种移动应用程序,系统应用程序,移动浏览器,自制本机或混合应用程序等。

https://admhelp.microfocus.com/uft/en/14.03/UFT_Help/Content/MC/mobile_on_UFT_setup.htm https://admhelp.microfocus.com/uft/en/14.03/UFT_Help/Content/MC/mobile_on_UFT_setup.htm

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM