BreadcrumbHomeResourcesBlog Appium IOS Framework For Automated Testing: Tutorial March 8, 2022 Appium iOS Framework for Automated Testing: TutorialAutomationBy Nato VasilevskiWith new updates for iOS devices happening regularly each year, the market for testing iOS applications is stronger than ever. Users have come to expect exceptional functionality with their iOS applications, and in turn, testing teams must keep pace. To do so, the right iOS test automation framework is needed. Appium is the most popular open-source iOS test automation framework. This includes test automation for native mobile, web, and hybrid apps. This blog will walk you through the benefits of Appium iOS and a tutorial for how to do iOS test automation with Perfecto and Appium.Related Resources >> Appium Framework: Pros & ConsTable of ContentsBenefits of Appium for iOS How to Start Appium iOS Test Automation With Perfecto How to Run Tests with Appium iOS:Tutorial Bottom Line Table of Contents1 - Benefits of Appium for iOS 2 - How to Start Appium iOS Test Automation With Perfecto 3 - How to Run Tests with Appium iOS:Tutorial 4 - Bottom Line Back to topBenefits of Appium for iOS Appium for iOS is a powerful tool that can be used to automate the testing of mobile and web applications across a variety of platforms. Here are some of the top benefits: Affordable & Open-Source: Appium is free and open-source, and it is simple to install. No additional installation on a device is needed to support Appium. Cross-Platform Support: Appium tests can run on both iOS and Android without requiring any changes to the code. Flexible: Appium provides support for multiple development languages through Remote WebDriver language bindings (Java, JavaScript, Perl, Python, C#). Appium can cover black box end-to-end test flows including outside-the-app scenarios.Record & Playback: Appium, like other automation tools, has a record and playback feature. Using Appium's record and playback functionality, inspectors may be used to speed up testing. It inspects the DOM to record the actions of the native app (Document Object Model). Integration with CI tools: Most CI technologies may be integrated with Appium to provide automated test triggering throughout release cycles. Related Resource >> Appium: Pros, Cons, and What The Future Might Look LikeBack to topHow to Start Appium iOS Test Automation With Perfecto Before you get started with testing Appium for iOS, there are a few things that you will need to do beforehand. Install: Java 8 An IDE to write your tests on - Eclipse or IntelliJ Maven If you use Eclipse, you should also install: Maven Plugin and TestNG Plugin If you use IntelliJ IDEA, you should install: Maven Plugin for IDEA (TestNG Plugin is built-in in the IntelliJ IDEA, from version 7 onwards.) Back to topHow to Run Tests with Appium iOS:Tutorial Integrating your existing Appium test code with Perfecto is easy. You can configure your TestNG/Maven projects from within your IDEs (IntelliJ, Eclipse, etc.). Simply provide your private cloud URL and security token, then define the desired capabilities for the platforms you want to test against. 1. Go to https://github.com/PerfectoMobileSA/PerfectoJavaSample and download the project. This is a project you can use for both Selenium and Android tests, but this blog will concentrate on iOS only.2. Import the project as an existing Maven project. 3. After importing, navigate to the PerfectoAppiumiOS.java file and add your Perfecto cloud name and token.4. Now the blueprint test is ready to run with the pre-loaded sample test. If you want to create your own test covering any use case, you can use this Java file as an example. As Perfecto is Appium-friendly, users can inject previously created Appium tests. The tests will still work if the cloud, token, and capabilities are set correctly. Perfecto supports iOSDriver, AppiumDriver, and AndroidDriver, and extended functionalities including: Image and Audio injection Location set Network virtualization Face ID and Fingerprint injection Image and Text analysis Call and SMS support (by inserting real SIM cards in the devices) For element location, you can use the embedded tool called Object Spy. Perfecto’s “Object Spy” feature can show the application’s object properties, which can be used in Appium scripts.Once the test is finished, you can view your results with Perfecto’s Insights dashboard.The Insights view showcases a dashboard of data consisting of three powerful widgets that provide you with greater visibility and context into test status, so you can save even more time identifying, prioritizing, and fixing issues. Insights also provides intelligent analysis and actionable advice on how to proceed, so you can act quickly and improve your tests. If you are a current Perfecto customer, the Insights view and enhanced capabilities are available for you to start using, in the Test Analysis section. Related Resource >> Perfecto Test Reporting & AnalyticsBack to topBottom Line Perfecto gives your team immediate access to thousands of real iOS devices, even from different parts of the world. Appium scripts may be written in a variety of languages (Java, C#, etc.) and executed by test automation engineers and developers. Teams can then seamlessly run these scripts on actual devices in Perfecto’s cloud. See a demo of testing iOS apps with Appium and Perfecto here. START TrialBack to top
Nato Vasilevski Solution Engineer, Perfecto by Perforce Nato has been with Perfecto for more than five years. During his time, he has worked with the largest German banks by helping them achieve top ratings for their applications. Nato achieved this by implementing Perfecto and enforcing best practices in line with the industry standard methodologies. The experience that Nato has gained from his various roles contributes to his daily success and helps him better understand Perforce customers' needs, risks, and level of urgency for every project. Nato has years of experience with QA Automation, is a Certified Microsoft Expert, over 13 years of IT experience, and has authored numerous articles and blogs.