Skip to content

[Feature] Generate Screenshots with UI Tests

Apollo Zhu requested to merge apollozhu/kdeconnect-ios:test-ios14 into master

Changelog

  • Lower test targets to iOS 14 (same as the main app)
  • Separate Device initialization from network package
  • Write UI test to take screenshots for most parts of the app
  • Add fastlane as a dependency
  • Force xcodebuild to use arm64 architecture when run by GitLab CI

Usage

Install fastlane, navigate to KDE Connect folder in terminal, and run fastlane screenshots

Motivation

As we are preparing for release on the App Store, one requirement is to provide screenshots. Automating the process (as much as we can) allows us to focus on other aspects of the development.

Demo

Screenshots of KDE Connect on different devices required by the App Store

+---------------------------------------+-------+
|               snapshot results                |
+---------------------------------------+-------+
| Device                                | en-US |
+---------------------------------------+-------+
| iPhone 8 Plus                         |  💚   |
| iPhone 13 Pro Max                     |  💚   |
| iPad Pro (12.9-inch) (2nd generation) |  💚   |
| iPad Pro (12.9-inch) (5th generation) |  💚   |
+---------------------------------------+-------+

[20:01:31]: Generating HTML Report
[20:01:31]: Successfully created HTML file with an overview of all the screenshots: '~/kdeconnect-ios/KDE Connect/fastlane/screenshots/screenshots.html'

+------+---------------------------------------------------------------+-------------+
|                                  fastlane summary                                  |
+------+---------------------------------------------------------------+-------------+
| Step | Action                                                        | Time (in s) |
+------+---------------------------------------------------------------+-------------+
| 1    | default_platform                                              | 0           |
| 2    |        if [ -z "`xcrun simctl list devices available | grep ' | 0           |
| 3    | capture_screenshots                                           | 280         |
+------+---------------------------------------------------------------+-------------+

[20:01:33]: fastlane.tools finished successfully 🎉
Edited by Apollo Zhu

Merge request reports