如果要运行移动应用程序,则要在Android上运行。 Android设备主导了智能手机市场。 Genymotion允许您在一系列虚拟Android设备上并行运行Appium测试。 Applitools使您可以快速验证每个设备如何呈现每个Appium测试。 Genymotion和Applitools共同为您提供功能和视觉测试的快速覆盖。
作为质量检查自动化专家,您知道需要在Android上进行测试。 然后,您查看市场并意识到市场是多么分散。
How fragmented is Android?
Fragmented is an understatement. A study by OpenSignal measured over 24,000 unique models of Android devices in use, running nine different Android OS versions across over three dozen different screen sizes, manufactured by 1,294 distinct device vendors. That is fragmentation. These numbers are mind-boggling, so here’s a chart to explain. Each box represents the usage share of one phone model.
Plenty of other studies confirm this. There are 19 major vendors of Android devices. Leading manufacturers include Samsung, Huawei, OnePlus, Xiaome, and Google. The market share of the leading Android device is less than 2% of the market, and the market share of the top 10 devices is 11%. The most popular Android version accounts for only 31% of the market.
We would all like to think that Android devices behave exactly the same way. But, no one knows for sure without testing. If you check through the Google Issue Tracker, you’ll find a range of issues that end up as platform-specific.
Implications for Android Test Coverage
因此,如果每个Android设备的行为可能都不同,那么究竟应该如何测试您的Android应用程序呢? 一种方法是在每个平台上功能上运行测试并评估代码中的行为-这是昂贵的。 另一种方法是在一个平台上运行,并希望代码可以在其他平台上运行。 从功能上讲,这可以告诉您该应用程序正常运行-但您容易遭受设备特定的行为的影响,这些行为在未经测试的情况下可能并不明显。
为了可视化在24,000个独特平台上进行测试的挑战,假设您的应用程序只有10个屏幕。 如果将这十个不同的屏幕端到端地放置在24,000个独特的设备上,它们将延伸30英里。 那比马拉松的距离还长!
Could you imagine manually checking a marathon’s worth of screens with every release?
I can’t run a marathon, much less do while examining thousands of screens. Thankfully there’s a better way, which I’ll explain below: using Genymotion, Appium, and Applitools.
What is Genymotion?
Genymotion is a leading provider of cloud-based Android emulation and virtual mobile infrastructure solutions. Genymotion frees you from having to build your own Android device farm.
Once you integrate your Appium tests with Genymotion Cloud, you can run them in parallel across many Android devices at once, to detect bugs as soon as possible and spend less time on test runs. That’s powerful.
借助Genymotion Cloud,您可以选择仅针对最受欢迎的Android设备/操作系统组合进行测试。 或者,您可以详细测试特定平台供应商的组合。 Genymotion使您可以灵活地运行所需的任意Android组合。
Why use Genymotion Cloud & Applitools?
Genymotion Cloud可以跨多个平台运行您的Android功能测试。 但是,功能测试是应用程序可能遇到的设备和操作系统版本问题的一部分。 除了功能测试。 您可能会遇到视觉问题,这些问题会影响您的应用的外观以及运行方式。 您如何使用Genymotion Cloud运行视觉UI测试? 应用工具。
Applitools提供了AI驱动的应用程序视觉测试,并允许您轻松测试跨平台以识别视觉错误。 视觉回归似乎只是对客户的干扰。 但是,最糟糕的是,视觉错误会阻止您的客户完成交易。 视觉错误会带来实际的损失–未经视觉测试,通常不会出现,直到用户在现场遇到它们为止。
这是我正在谈论的一个例子。 这种混乱的布局阻止了Instagram在该广告上赚钱,并可能导致客户和工程副总裁不高兴。 所有元素都存在,因此此屏幕可能已通过功能测试。
You can find plenty of other examples of visual regressions by following #GUIGoneWrong on Twitter.
Applitools uses an AI-powered visual testing engine to highlight issues that customers would identify. More importantly, Applitools ignores differences that customers would not notice. If you ever used snapshot testing, you may have stopped because you tracked down too many false positives. Applitools finds the issues that matter and ignores the ones that don’t.
How to use Genymotion, Appium & Applitools?
Applitools已与Appium一起使用,可以为您的Android OS应用程序提供视觉测试。 现在,您可以使用Applitools和Genymotion在众多Android虚拟设备上运行视觉测试。 总结一下:
- Write your tests in Appium using the Applitools SDK to capture visual images.
- Launch the Genymotion cloud devices via command line.
- Your Appium scripts will run visual tests across the Genymotion virtual devices.
That’s the overview. To dive into the details, check out this step-by-step tutorial on GitHub demonstrating the integration of Applitools & Genymotion Cloud using Java / TestNG.
虽然很完整,但是您需要以下一些其他信息:
- Download and install Python 3
- Next, install pip3 on Windows or macOS
- Finally, make sure you install Android SDK
Here is a series of step-by-step tutorial videos using Genymotion, Appium, and Applitools. Here’s the first one:
Genymotion, Appium, and Applitools: Better Together
当同时运行Appium,Applitools和Genymotion时,可以极大地提高测试效率。 您可以重用现有的Appium测试脚本。 Genymotion使您可以并行运行所有功能和视觉测试。 而且,借助由Applitools AI驱动的视觉测试的准确性,您可以仅跟踪重要的问题,而不会分散误报。