我最近开始研究在 Android 上自动进行无障碍测试.网上没有太多信息.有没有人探索过这个或目前正在这样做?如果是这样,你能分享你的想法/方法吗?
I recently started looking into automating accessibility testing on Android. There isn't much information out there on the web. Has anyone explored this or are currently doing this? If so, can you share your ideas/approach?
似乎 Android 的 uiautomator 依赖于辅助功能的工作,但它不支持测试辅助功能.如果它依赖于 Accessibility 特性,那是否意味着是否存在可访问标签等基本验证可以通过使用 uiautomator 执行 UI 测试来完成?
Seems like Android's uiautomator relies on Accessibility features working but it doesn't support testing Accessibility. If it relies on Accessibility features, does that mean that basic validation like accessible label exists, etc. can be done by just executing UI tests using uiautomator?
这对我来说是一个新领域,所以任何信息都会有所帮助.
This is a new area for me so any information could be helpful.
这里有一个 伟大的介绍 Android 中的辅助功能测试.基本上可以归结为:
Here's a great introduction to Accessibility testing in Android. It basically boils down to:
另外,我建议观看 此来自 GTAC 2015 的演示,了解某些人的可访问性测试很好的主题背景.
Also, I recommend watching this presentation from GTAC 2015 on accessibility testing for some great context on the topic.
对于检查可访问性的自动化测试,我非常建议从可以在跨屏幕共享的元素(菜单、布局、主题、自定义控件)中识别的问题开始.虽然它们不会捕捉到偶尔会弹出的一次性错误,但它们会解决您应用中随处发生的问题,如果您愿意的话,这是一种按数量划分优先级"的方法.
For automated tests that check for accessibility, I'd very much recommend starting with issues that can be identified in elements that are shared across screens (menus, layouts, themes, custom controls). While they won't catch the one-off errors that will occasionally pop up, they'll address issues that happen everywhere in your app, a 'prioritize by volume' approach if you will.
此外,如果您的团队使用 Android Studio,那么您肯定希望能够编写驻留在代码中的 Espresso 测试.QA 是开发过程的一部分.除非有一些合法的博洛尼亚要处理,否则访问您的测试所在的子文件夹应该不是问题.例如,将 'androidTest' 文件夹拆分为 子模块 作为测试人员,您拥有拉/推权限,但只能读取应用程序其余部分的权限,因此您可以自己编译和运行.如果您正在编写 Appium 测试,可能更难要求您的开发团队在构建期间将它们作为自己的 BVT/smoke 测试过程的一部分运行,但并非闻所未闻.
Also, if your team uses Android Studio then you definitely want to push for the ability to write Espresso tests that reside with the code. QA are part of the development process, period. Getting access to a subfolder where your tests reside shouldn't be a problem unless there some legal bologna to deal with. For instance, split out the 'androidTest' folder as a submodule where you have pull/push rights as a tester, but only read rights to the rest of the app so you can compile and run yourself. If you're writing Appium tests, it may be harder to ask your dev team to run them as part of their own BVT/smoke test process during builds, but not unheard of.
至于视觉分析和音频注入/确认,这些是您可能需要使用某些服务或商业工具的高级功能为.
As for visual analysis and audio injection/confirmation, these are advanced capabilities that you'll probably need to use some service or commercial tool for.
祝你好运!
这篇关于Android 上的可访问性测试自动化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!