Lets start with iOS Automation on Windows with BrowserStack: A Guide
Automation testing has become a boom in the modern era. If we talk about automation testing, it is imitating real test scenarios through automation. Regarding application testing, an application comes with different operating systems like android and IoS. Browserstack is doing interaction part.
Lets see the advantages and disadvantages.
Advantages:
- Parallel testing of multiple devices. Test cases can run on multiple emulated devices with numerous versions.
- Automation testing results in better quality of new versions of the product
- Fast testing process as it can numerous devices
- Minimise the count of bugs and errors.
Disadvantages:
- When doing automation for IoS appplication, this may be costly as IoS requires MAC system to find Xcode.
- When there is iOS, Android updates, one needs to wait for the emulators latest version.
Why UI test Automation?
This is the process of verifying UI behaviour which is as per the expectation of the end user. We all know manual testing is costly and time taking compared to automation testing. There are some positive aspects of UI test automation like :
- cost friendly
- scalability
- parallelisation
- climbable
- accessibility
Why to run UI tests on iOS devices?
Some report, iOS is the second most popular device in the world. Hence when we talk about app testing, iOS also comes into picture. iOS testing should be done functionally along with UI testing. Test cases must be applied to variety of devices either physical or emulator. It is very hard to find n number of real devices to test. Hence the best solution is to test on some cloud based application like browserstack which has almost all the type of iOS version. UI test are mostly done on the real devices, browsers and operating systems. Osasionally due to certain conditions testers cannot get access to the real devices, in such cases they opt for real device clouds. Browserstack supports multiple testing frameworks like Appium, TestNg, XCUITest etc. They also provide features like time zone, languages, geological testing etc.
How to automate iOS application on Windows machine?
For automating iOS on windows application, we can use some of the cloud automation tools like BrowserStack. BrowserStack is a popular cloud-based platform that helps developers and testers to perform live interactive testing of various platforms like web and mobile applications on real devices and browsers. Browserstack supports vast range of real devices and browsers. Hence we get a platform to ensure the compatibility and functionality across multiple devices.
Lets check how we can continue with browserstack. The pre requirements needed to start working on iOS automation are:
- One needs to have App Live subscription
- One needs to have App Automate subscription and should have automated code
1. App Live from BrowserStack
Visit the browserstack website and sign up. Login to your account and access the Browserstack live dashboard. Now here we can choose the desired device. For our case it is iOS. Launch the desired real device. We have to upload our app to this real device. So upload from the option upload app. Now finally the app is been installed in the device. We can now use that application. Here we can open the debug mode to start searching the locators.

2. App Automate
We have solved one of the problem to find locator. We will need to have environment where we can run and execute our code. App automate is providing us the platform to run the desired code. We can set the desired capabilities according to the browserstack and run our code. This tool also provides us a professional report to analysis the test case failure. Browserstack is doing interaction part.
Set the desired capabilities in the test like iOS version, model number, app requirements etc. Also we have to include the app capabilities. We will pass the desired capabilities to the WebDriver instance to initiate the connection to a specific iOS device and version combination. Finally the establishment is done. We have to run the test scripts using the WebDriver library for iOS. Below is the connection establishment code.
Here we get app automate from the BrowserStack when we upload our app there along with the username and accessKey.
package stepDefinitions; import io.appium.java_client.android.AndroidDriver; import io.cucumber.java.After; import io.cucumber.java.Before; import org.LaunchEmulator; import org.openqa.selenium.remote.DesiredCapabilities; import java.net.MalformedURLException; import java.net.URL; import java.util.HashMap; public class Hooks extends LaunchEmulator { @Before public void setUp() throws MalformedURLException { DesiredCapabilities desiredCapabilities = new DesiredCapabilities(); HashMap<String, Object> browserstackOptions = new HashMap<String, Object>(); browserstackOptions.put("userName", " "); browserstackOptions.put("accessKey", "
"); browserstackOptions.put("buildName", "M2"); desiredCapabilities.setCapability("appium:deviceName", "iPhone 12"); desiredCapabilities.setCapability("appium:os_version", "14"); desiredCapabilities.setCapability("appium:app", "bs://4aa576d525a76c1eedc6b76f99a50e3b"); desiredCapabilities.setCapability("platformName", "ios"); desiredCapabilities.setCapability("appium:automationName", "XCUITest"); desiredCapabilities.setCapability("bstack:options", browserstackOptions); URL url = new URL("https://hub-cloud.browserstack.com:443/wd/hub"); driver = new AndroidDriver(url, desiredCapabilities); } @After public void tearDown() { driver.quit(); } }
This is how the final report looks like once the execution is done in BrowserStack

Congratulations, we have done the final setup. Browserstack is doing interaction part. This helped us to overcome the OS dependency. Hence we have done iOS Automation on Windows with BrowserStack: A Guide
References
https://www.browserstack.com/docs/app-automate/appium
https://www.browserstack.com/docs/app-automate/appium/upload-app-from-filesystem