Google launched an open source GTXiLib, an accessibility test automation framework for iOS
Recently, Google has been very active in helping developers improve the usability of apps. It has not only published barrier-free technical guidance programs, established an accessibility support team, but also recently announced on the blog GTXiLib, an open-source iOS-specific automated testing framework, to help developers create Accessibility App.
GTXiLib is written in Objective-C and integrates with the existing XCTest testing framework and performs all registered availability checks before XCTest finishes calling tearDown. When the GTXiLib test fails, the XCTest test will fail, and the two will complement each other to better fix and find problems.
It can be used to:
- Reuse your tests: GTXiLib integrates into your existing functional tests, enhancing the value of any tests that you have or any that you write.
- Incremental accessibility testing: GTXiLib can be installed onto a single test case, test class or a specific subset of tests giving you the freedom to add accessibility testing incrementally. This helped drive GTXiLib adoption in large projects at Google.
- Author your own checks: GTXiLib has a simple API to create custom checks based on the specific needs of your app. For example, you can ensure every button in your app has an accessibilityHint using a custom check.
Google also stated that in order to improve GTXiLib, the framework will collect some usage data uploaded to Google Analytics, such as testing the status of passed or failed applications, and the MD5 hash of the application binding ID, which will let Google know the use of GTXiLib. Happening. If the user does not want to, you can choose to add a code snippet to disable Google Analytics.
You can access this project here.