Apple introduced iOS 13 in June with a major overhaul and a long list of new features. First off, the tech giant claimed that the new OS is going to be faster and more efficient than ever. To the delight of iOS app developers and users, Apple mentions that “apps will launch up to 2x faster than before and be smaller in download size.” Besides performance, iOS 13 comes with a whole new look (called Dark mode), new privacy and security ways, new tools and features for photo and camera, new map and navigation solutions, new customization options for emoji and messages, and a slew of other great features that can be reviewed on their official page.
From a testing perspective, all these new changes and developments require a timely response. Therefore, developers and testers need to ensure that their iOS apps are fine-tuned for the new OS well ahead of its official launch.
With the official version to be launched in September developers have plenty of time to prepare for the transition. Fortunately, both the public and developer beta versions of iOS 13 are now available. Both can be downloaded on iOS devices. Obviously, the developer version of the beta is recommended for testing purposes. It’s more up-to-date and includes all the latest changes that will take some time to come into effect on the public beta.
Installing iOS 13 dev beta
Firstly, to download and install iOS 13 developer beta on your device, follow the steps given below:
- Open your device (that currently runs on iOS 12) and go to http://developer.apple.com/.
- Click on the hamburger menu on the left, go to the Account area, and sign in with your Apple ID.
- In the Account’s Menu area, click on Downloads and scroll all the way down to iOS 13 beta profile.
- Click on “Install Profile” and then review the terms to proceed with the installation.
- Once the installation is complete, restart your device.
- Go to Settings > General > Software Update and download the iOS 13 beta.
That’s pretty much it and you should now have the iOS 13 beta installed on your device.
Update your testing environment to support iOS 13 beta
First off, you need to have an automation testing platform to get your application testing up and running. Experitest’s Appium Studio for Eclipse is a great place to start. Using Appium Studio, you can get your Appium automation going within a few minutes. Then, start writing tests for any application regardless of OS or hardware dependencies. Once you have the testing environment set up, follow the steps given below to ensure everything is in place for iOS 13 beta testing:
- Within your testing suite, open two devices: one running on iOS 12 and the other on iOS 13 beta.
- Install your application on both the devices.
- Use an existing test that you have created for iOS 12 (or older versions). Run it to see if everything works as expected.
- Now, run the same test on iOS 13 beta to see whether it successfully executes or fails at some point.
- Given the magnitude of new features and updates in iOS 13, it’s very likely that that test will fail. When it does, you’ll need to locate where this happens. Make a few quick changes to ensure your existing test is compatible with the new OS.
Updating your existing tests to support iOS 13 beta
To make it a bit easier for our audience to understand the steps, we have provided a complete demo of how the process works in our previous webinars. As covered in the demo, we have initially created a simple test focusing on iOS 12. The test installs an app, launches it, performs a few clicks on a few elements within the app goes back and then closes the app.
Now, we will try to run the same test on iOS 13 beta. We will replace the serial in the deviceQuery value (within Capability Manager). It goes only as far as launching the app but fails where it’s required to click on the Chevron button. The reason being, Apple has updated some of the identifiers for native buttons in iOS 13 beta, including the Chevron. So we get an error message that says: “an element could not be located on the page using the given search parameters.”
What we can do to fix this issue is not that complicated. Open iOS 13 beta, fetch the dump from that same page and compare it with the old dump taken from iOS 12. In the demo, we have saved the iOS 12 dump within the Pages folder under MyProject. Under the dump properties, we can see a list of elements and their values. These include Test, ID, and Class, etc. By placing the XPath in the search box (right under the Dump Properties section), we can find out the exact location where the test failed to proceed. In our demo case, the Chevron button is where the test failed and we can see it highlighted in the dump comparison.
At this stage, we need to find a better identifier that would work for both versions. What we notice is that both on iOS 12 and iOS 13 beta, the class is UIAButton which we can use as a common identifier (instead of the id with “more info” on iOS 12 and “chevron” on iOS 13 — two different identifiers). Accordingly, we will change the identifier for iOS 12. Now our test works across all the iOS devices regardless of what OS versions they operate on.
Follow the steps above to quickly update your test, save it, and rerun the test to make sure everything works as expected.
Scaling up your Appium automation project with parallel execution
Now that you have ensured your test runs on both the iOS 12 and iOS 13 beta, it’s time to scale up your automation project and execute it on a wide range of iOS devices using our parallel execution feature. Keep in mind, though, that running your test for different iOS versions doesn’t mean it will also work on all types of iOS devices. Apple’s ecosystem of devices and technologies is pretty vast and you’ll need to make sure your test successfully runs on every device relevant to your app.
The following steps will enable you to use the parallel execution feature within Appium Studio for Eclipse:
- Click on “Code Export” menu right next to the Capability Manager to locate the TestNG code
- Locate “public class” and copy the class value (in the demo case, it’s “MyTestiOS12”)
- Go to Capability Manager and change the deviceQuery value to @os=‘ios’ (so that the test can run on any ios devices).
- Click on the save icon at the top (below the ‘Navigate’ menu) to save these changes
Once you’re done with the above steps, it’s time to create a new mobile test case for parallel execution. Follow the steps given below:
Go to File > New > Other. You will see a new wizard box open up where you can select a new “Mobile Test Case” under the “Mobile Automation” folder.
Click Next and past the public class value (you had copied in the previous step) in the Name field.
Click finish. The new mobile test case should now be added to your test suite. At this stage, you need to replace its code with the TestNG code under the “Code Export” menu and save the changes.
Next, go to File again > New > Other > Cloud Parallel Execution (under Mobile Automation) > Next > MyProject > Next > Choose your test (MyTestiOS12 in the demo case) > Select devices where you want to run the test on > Next > Give your file a name > and Finish.
What this process essentially does is generate a quick TestNG XML code. Run this code against any iOS device without having to do a specific configuration manually.
You are at the final stage now. Run the test as TestNG suite and you should be able to see parallel testing start on the SeeTest cloud.
As per the test, the parallel execution will proceed to install the app. Next, it will launch and run the same test on all selected iOS devices on the SeeTest cloud.
iPhone users have a tendency to be early adopters when it comes to new OSes. As a result, it is imperative that developers and testers get used to the new iOS 13 system. They must test their existing iOS applications, and get ready for a smooth and seamless transition. Well before the new iOS sets in motion, of course. Past statistics tell us that early Apple adopters don’t even wait for the official release to get their hands on the beta versions. With iOS 12, for example, we saw a dramatic adoption rate the day it was launched last September. With 14% adoption rate on the first day it soared to 50% within only two weeks and more than 60% within just four weeks.
In a nutshell, developers and testers should make the most of the time they have in their hands and get ready for the big transition early on. The Experitest Continuous Testing Platform is here to help you accelerate your iOS testing and deliver a flawless experience to your application users on mobile, web, and across different browsers.