COVER There are three main types of tests on iOS. Each testing type has it’s specific tools, libraries and methods to work with. Unit Tests Test small components by separating it from larger modules. Integration Tests Integrate components into modules and test them again working in together. UI Tests Test user interfaces and animations on different screens and orientations.
TO TEST UI Design Code SCREENS With newest devices, we have many different device sizes and screens. USER FLOWS When we update the code, user flows still need to start and complete correctly. ANIMATIONS Are we sure the animations complete correctly on all screens and devices? Are they fluid in all cases?
to choose a distribution service. This is a place where our application files will be hosted. TestFlight Owned by Apple and integrated into iTunes, previously separate service. Crashlytics Beta Owned by Twitter, began as a crash reporting service. Supports more platforms. HockeyApp Premium service with powerful API, for multi platform deployment. DeployGate Premium app distribution with additional services such as analytics and crash reporting.
OUR WORK Create a group Online service Invite testers Online service Add devices Apple Developer Portal Run tests Xcode Provisioning profile Apple Developer Portal Build application Xcode Download TBC Wait for registration I want to see
Create an archive Xcode Package the archive Xcode Sign & Export Xcode .ipa file Choose testers Online Service Upload to Service Desktop app or browser Write change log Online Service Repeat for every build Provisioning profile Lets assume it is a success - A CLIENT WISHES TO SEE OUR WORK
PROBLEMS GitHub Service hooks 1 Bash Command line scripts 2 Ruby Easy & useful 3 Homebrew Installing tools 4 CocoaPods Dependency manager 5 xctool Facebook’s Build Tool 6 CI Server A Mac or a service 7 Gems Existing gems
1. Load UDID’s from distribution service 2. Adding devices to Apple 3. Modifying provisioning profiles 4. Installing certificates 5. Downloading profiles 6. Notifications and messaging 7. Building application 8. Running tests 9. Signing application 10. Uploading build To make it work as a system in CLI Many problems had to be tackled and many systems had to be connected.
API Sadly, Apple does not care much. But developers do. Cupertino Gem comes to our help. Devices Displays registered devices on portal Profiles Edits and downloads provisioning profiles Certificates Lists and downloads certificates App IDs Lists all Application IDs and bundles
A BUILD Another Gem will do the job. Gem install Shenzhen and distribute with command line. iTunes Connect Uploads a build to iTunes Connect HockeyApp Uploads an .ipa file to HockeyApp TestFlight Old TestFlight portal also supported Crashlytics Beta Sends builds to Crashlytics Beta
either by a CI server or command line Building Builds for all specified devices Signing Signs with correct code identity Distribute Deploys to specific service Provisioning Downloads the new provisioning profile New devices Add devices to Apple Developer Portal Git Push Starts the process CLI interface Easy to use on client or CI server
integrate Will do this entire process for you automatically. Any server Also works on Travis CI server Little setup Almost no configuration needed Uses Git Deploy can be hooked to a specific branch Notifications Fully integrated HipChat D
you are interested in tools, here are the links. Of course, many other tools exist, that we did not mention. Do not be afraid to try those out. Specta & Expecta - https://github.com/specta/expecta Atlantis - https://github.com/Legoless/Atlantis Cupertino - https://github.com/nomad/cupertino Shenzhen - https://github.com/nomad/shenzhen Dominus - https://github.com/Legoless/Dominus Fastlane - https://github.com/KrauseFx/fastlane TOOLS FOR CONTINUOUS INTEGRATION Some tools mentioned in this talk.