SlideShare a Scribd company logo
1 of 18
IOS App testing with XCTest and XCUITest
Mobile Testing platforms for developers and testes to test their app on
targeted region specific smartphones and networks
Who we are?
What all we are going to cover?
 IOS Automation challenges
 Current tool options
 Introduction to XCTest and XCUITest
 Creating a basic automation script
 Understanding impact of XCUITest on Appium
IOS Automation challenges
 Any Automation tool has for IOS has to rely on Native Test Framework
provided by Apple ( UIAutomator or XCUITest)
 Native framework have limited set of APIs restricting the type of actions
that can be performed on Apps during Automation
 IOS App resigning and distribution profile is quite cumbersome.
What are the current options for IOS automation?
Features/Tools
Appium (>1.6
version)
Calabash XCTest XCTUITest EarlGrey
Type of Mobile
Application Supported
Native Yes Yes Yes Yes Yes
Hybrid Yes Yes Yes Yes Yes
Mobile Web Yes No No No No
Type of Automation
Scripts
UI Driven Functional
Tests
Yes Yes No Yes Yes
Unit Tests No No Yes No Yes
Scripting Language
Java, C#, Ruby,
Python, Perl
Cucumber, Ruby
Objective C,
Swift
Objective C,
Swift
Objective
C
Test Recording
capability
Partial ( Using
Appium Inspector)
No Yes Yes No
Features/Tools
Appium(Including
XCUITest)
Calabash XCTest XCTUITest EarlGrey
Multi Device Execution (on in-
house devices)
Yes ( Selenium Grid)
Framework Dev
required
Framework Dev
required
Framework Dev
required
Framework Dev
required
Multi Device Execution (on
Cloud Platforms like pCloudy)
Yes Yes Upcoming Upcoming Upcoming
Integration with CI tools
(Jenkins)
Plug-ins available Plug-ins available
Framework
Development
required
Framework
Development
required
Framework
Development
required
Ease of learning
medium medium
Complex ( For
developers)
Complex ( For
developers)
Complex ( For
developers)
Object Recognition Method
Native Object Recognition
( Based on Object
Properties)
Native Object
Recognition ( Based on
Object Properties)
Native Object
Recognition (
Based on Object
Properties)
Native Object
Recognition (
Based on
Object
Properties)
Native Object
Recognition (
Based on Object
Properties)
Support
Extremely Active
Community
Average
Supported by
Apple
Supported by
Apple
Supported by
Google
What are the current options?
Introduction to XCTest
 XCTest is testing framework provided by XCode. Released with XCode 5
 XCTest provides the ability to create
 Test case subclasses
 Test Methods
 Assertions
 Allows tests to be run directly from the source code
 Supports both Objective C and Swift
 It can be used as part of CI using XCode server and XCodeBuild.
 A significant improvement to the framework with launch of XCUITest wit
XCode 7
Introduction to XCUITest
 XCUITest is combination of XCTest and Accessibility Framework by XCode.
 Accessibility framework provides all the API to perform UI actions like Tap,
Swipe etc.
 XCUITest allows UI Testing
 Find elements on UI Interface
 Perform UI Actions on those elements
 Validate UI properties
 In terms of IOS versions , XCUITest can work for IOS 9 and above
Let’s understand the ecosystem
XCTest XCode XCodeServer XCodeBuild
Command Line
Tool to build and
execute tests.
This is used by
XcodeServer
Used for
Continuous
Integration.
Schedule bot
Runs and
generate reports
IDE where tests
be written or
recorded
Test Framework
Concept of Hosting
Understanding the difference
XCTest .app file
XCUITest UI Test Runner
.app file
Host Application
Host Application
Target Application
Test Bundle
Test Bundle
Scripting Elements
There are three core APIs
 XCUIApplications
let app = XCUIApplication()
 XCUIElements and XCUIElementQuery
let emailTextField = app.textFields["Email"]
emailTextField.typeText("testmunkdemo@testmunk.com")
 Assertion
XCTAssertEqual(app.textFields.count, 2);
Let’s create a basic test
Impact on Appium
On IOS, Appium proxies commands to UIAutomation script ( part of Instruments). UI
Automation scripts are Java scripts to interact with APP UI.
Impact on Appium
For IOS 9.x and above
UIAutomation
with
Instruments
Deprecated
and replaced
with
All the scripts written with UIA will fail with XCode 8 and can’t be run for IOS 9.3
above versions
Impact on Appium
The following capabilities need to be set after creating AppiumDriver object to run
XCUITest above v9.3
Please refer to the following blog for more information of Appium execution on pCloudy
https://www.pcloudy.com/xcuitest-for-ios-apps-and-how-to-test-with-xcode/
if (device.getVersion().compareTo(new Version("9.3")) >= 0) {
// XCUITest
keywords.typeText(By.xpath("//XCUIElementTypeApplication[1]/XCUIElement
TypeWindow[1]/XCUIElementTypeOther[1]/XCUIElementTypeTextField[1]"), "test@t
estname.com", "Email");
keywords.typeText(By.xpath("//XCUIElementTypeApplication[1]/XCUIElement
TypeWindow[1]/XCUIElementTypeOther[1]/XCUIElementTypeSecureTextField[1]"), "
testmunk", "Password");
} else {
// UIAutomation
keywords.typeText(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIATextFiel
d[1]"), "test@testname.com", "Email");
keywords.typeText(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIASecureT
extField[1]"), "testmunk", "Password");
}
XCUITest vs UIAutomation
Summary
 Launch of XCUITest has made significant impact on IOS automation
approach (new and existing)
 XCUITest is future for IOS automation.
 Appium is still the most popular choice of Automation tool for IOS Apps.
It can be used with both UIAutomation for older version and XCUITest
with 9.3 above versions.
Thank You
Let’s change the way Mobile App
Testing is performed

More Related Content

What's hot

Make XCUITest Great Again
Make XCUITest Great AgainMake XCUITest Great Again
Make XCUITest Great AgainKenneth Poon
 
Xcode 7 UI Testing - Xcake Dublin, October 2015
Xcode 7 UI Testing - Xcake Dublin, October 2015Xcode 7 UI Testing - Xcake Dublin, October 2015
Xcode 7 UI Testing - Xcake Dublin, October 2015roland99
 
[XCode] Automating UI Testing
[XCode] Automating UI Testing[XCode] Automating UI Testing
[XCode] Automating UI TestingPhineas Huang
 
Mobile Worshop Lab guide
Mobile Worshop Lab guideMobile Worshop Lab guide
Mobile Worshop Lab guideMan Chan
 
Automated Testing with GHUnit and KIF
Automated Testing with GHUnit and KIFAutomated Testing with GHUnit and KIF
Automated Testing with GHUnit and KIFMichele Titolo
 
Android Building, Testing and reversing
Android Building, Testing and reversingAndroid Building, Testing and reversing
Android Building, Testing and reversingEnrique López Mañas
 
Ios ui automation test framework
Ios ui automation test frameworkIos ui automation test framework
Ios ui automation test frameworkWinter Hong
 
少し幸せになる技術
少し幸せになる技術少し幸せになる技術
少し幸せになる技術kamedon39
 
SwtBot: Unit Testing Made Easy
SwtBot: Unit Testing Made EasySwtBot: Unit Testing Made Easy
SwtBot: Unit Testing Made EasyAnkit Goel
 
Ten Minutes To Tellurium
Ten Minutes To TelluriumTen Minutes To Tellurium
Ten Minutes To TelluriumJohn.Jian.Fang
 
Writing and Testing JavaScript-heavy Web 2.0 apps with JSUnit
Writing and Testing JavaScript-heavy Web 2.0 apps with JSUnitWriting and Testing JavaScript-heavy Web 2.0 apps with JSUnit
Writing and Testing JavaScript-heavy Web 2.0 apps with JSUnitAlex Chaffee
 
Functional Testing made easy with SWTBot for Developers and Testers
Functional Testing made easy with SWTBot for Developers and TestersFunctional Testing made easy with SWTBot for Developers and Testers
Functional Testing made easy with SWTBot for Developers and TestersAurélien Pupier
 
Data Flow Patterns in Angular 2 - Sebastian Müller
Data Flow Patterns in Angular 2 -  Sebastian MüllerData Flow Patterns in Angular 2 -  Sebastian Müller
Data Flow Patterns in Angular 2 - Sebastian MüllerSebastian Holstein
 
Tellurium 0.7.0 presentation
Tellurium 0.7.0 presentationTellurium 0.7.0 presentation
Tellurium 0.7.0 presentationJohn.Jian.Fang
 

What's hot (20)

Make XCUITest Great Again
Make XCUITest Great AgainMake XCUITest Great Again
Make XCUITest Great Again
 
Xcode 7 UI Testing - Xcake Dublin, October 2015
Xcode 7 UI Testing - Xcake Dublin, October 2015Xcode 7 UI Testing - Xcake Dublin, October 2015
Xcode 7 UI Testing - Xcake Dublin, October 2015
 
[XCode] Automating UI Testing
[XCode] Automating UI Testing[XCode] Automating UI Testing
[XCode] Automating UI Testing
 
Mobile Worshop Lab guide
Mobile Worshop Lab guideMobile Worshop Lab guide
Mobile Worshop Lab guide
 
Automated Testing with GHUnit and KIF
Automated Testing with GHUnit and KIFAutomated Testing with GHUnit and KIF
Automated Testing with GHUnit and KIF
 
Android Building, Testing and reversing
Android Building, Testing and reversingAndroid Building, Testing and reversing
Android Building, Testing and reversing
 
Ios ui automation test framework
Ios ui automation test frameworkIos ui automation test framework
Ios ui automation test framework
 
Xcode7 UI Automation
Xcode7 UI AutomationXcode7 UI Automation
Xcode7 UI Automation
 
少し幸せになる技術
少し幸せになる技術少し幸せになる技術
少し幸せになる技術
 
SwtBot: Unit Testing Made Easy
SwtBot: Unit Testing Made EasySwtBot: Unit Testing Made Easy
SwtBot: Unit Testing Made Easy
 
SWTBot Tutorial
SWTBot TutorialSWTBot Tutorial
SWTBot Tutorial
 
JsUnit
JsUnitJsUnit
JsUnit
 
Ten Minutes To Tellurium
Ten Minutes To TelluriumTen Minutes To Tellurium
Ten Minutes To Tellurium
 
Writing and Testing JavaScript-heavy Web 2.0 apps with JSUnit
Writing and Testing JavaScript-heavy Web 2.0 apps with JSUnitWriting and Testing JavaScript-heavy Web 2.0 apps with JSUnit
Writing and Testing JavaScript-heavy Web 2.0 apps with JSUnit
 
Functional Testing made easy with SWTBot for Developers and Testers
Functional Testing made easy with SWTBot for Developers and TestersFunctional Testing made easy with SWTBot for Developers and Testers
Functional Testing made easy with SWTBot for Developers and Testers
 
Swtbot
SwtbotSwtbot
Swtbot
 
Data Flow Patterns in Angular 2 - Sebastian Müller
Data Flow Patterns in Angular 2 -  Sebastian MüllerData Flow Patterns in Angular 2 -  Sebastian Müller
Data Flow Patterns in Angular 2 - Sebastian Müller
 
UI testing in Xcode 7
UI testing in Xcode 7UI testing in Xcode 7
UI testing in Xcode 7
 
Tellurium 0.7.0 presentation
Tellurium 0.7.0 presentationTellurium 0.7.0 presentation
Tellurium 0.7.0 presentation
 
Activity
ActivityActivity
Activity
 

Similar to XCUITest for iOS App Testing and how to test with Xcode

Understanding XCUITest Framework Your Guide to Efficient iOS Testing.pdf
Understanding XCUITest Framework Your Guide to Efficient iOS Testing.pdfUnderstanding XCUITest Framework Your Guide to Efficient iOS Testing.pdf
Understanding XCUITest Framework Your Guide to Efficient iOS Testing.pdfpCloudy
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...Applitools
 
2012 mobile testingsummit-moet
2012 mobile testingsummit-moet2012 mobile testingsummit-moet
2012 mobile testingsummit-moetEing Ong
 
Appium understanding document
Appium understanding documentAppium understanding document
Appium understanding documentAkshay Pillay
 
Automation Testing With Appium
Automation Testing With AppiumAutomation Testing With Appium
Automation Testing With AppiumKnoldus Inc.
 
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with AppiumSrijan Technologies
 
Test automationslides
Test automationslidesTest automationslides
Test automationslidesUMA MAHESWARI
 
Xamarin UI Test And Xamarin Test Cloud
Xamarin UI Test And Xamarin Test CloudXamarin UI Test And Xamarin Test Cloud
Xamarin UI Test And Xamarin Test CloudEmanuel Amiguinho
 
Mobile Testing Challenges Lighting Talk with www.softtest.ie
Mobile Testing Challenges Lighting Talk with www.softtest.ieMobile Testing Challenges Lighting Talk with www.softtest.ie
Mobile Testing Challenges Lighting Talk with www.softtest.ieDavid O'Dowd
 
Challenges of automated mobile UI testing
Challenges of automated mobile UI testingChallenges of automated mobile UI testing
Challenges of automated mobile UI testingBartłomiej Pisulak
 
Building And Executing Test Cases with Appium and Various Test Frameworks.pdf
Building And Executing Test Cases with Appium and Various Test Frameworks.pdfBuilding And Executing Test Cases with Appium and Various Test Frameworks.pdf
Building And Executing Test Cases with Appium and Various Test Frameworks.pdfpCloudy
 
What's New with Perfecto? - Mid-Year Edition
What's New with Perfecto? - Mid-Year EditionWhat's New with Perfecto? - Mid-Year Edition
What's New with Perfecto? - Mid-Year EditionLizzy Guido (she/her)
 
100 effective software testing tools that boost your Testing
100 effective software testing tools that boost your Testing100 effective software testing tools that boost your Testing
100 effective software testing tools that boost your TestingBugRaptors
 
QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...
QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...
QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...QAFest
 

Similar to XCUITest for iOS App Testing and how to test with Xcode (20)

Understanding XCUITest Framework Your Guide to Efficient iOS Testing.pdf
Understanding XCUITest Framework Your Guide to Efficient iOS Testing.pdfUnderstanding XCUITest Framework Your Guide to Efficient iOS Testing.pdf
Understanding XCUITest Framework Your Guide to Efficient iOS Testing.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
open-west
open-westopen-west
open-west
 
Appium.pptx
Appium.pptxAppium.pptx
Appium.pptx
 
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
 
2012 mobile testingsummit-moet
2012 mobile testingsummit-moet2012 mobile testingsummit-moet
2012 mobile testingsummit-moet
 
Appium understanding document
Appium understanding documentAppium understanding document
Appium understanding document
 
Automation Testing With Appium
Automation Testing With AppiumAutomation Testing With Appium
Automation Testing With Appium
 
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
 
Test automationslides
Test automationslidesTest automationslides
Test automationslides
 
Rajiv Profile
Rajiv ProfileRajiv Profile
Rajiv Profile
 
Appium overview
Appium overviewAppium overview
Appium overview
 
Xamarin UI Test And Xamarin Test Cloud
Xamarin UI Test And Xamarin Test CloudXamarin UI Test And Xamarin Test Cloud
Xamarin UI Test And Xamarin Test Cloud
 
Mobile Testing Challenges Lighting Talk with www.softtest.ie
Mobile Testing Challenges Lighting Talk with www.softtest.ieMobile Testing Challenges Lighting Talk with www.softtest.ie
Mobile Testing Challenges Lighting Talk with www.softtest.ie
 
Challenges of automated mobile UI testing
Challenges of automated mobile UI testingChallenges of automated mobile UI testing
Challenges of automated mobile UI testing
 
Building And Executing Test Cases with Appium and Various Test Frameworks.pdf
Building And Executing Test Cases with Appium and Various Test Frameworks.pdfBuilding And Executing Test Cases with Appium and Various Test Frameworks.pdf
Building And Executing Test Cases with Appium and Various Test Frameworks.pdf
 
What's New with Perfecto? - Mid-Year Edition
What's New with Perfecto? - Mid-Year EditionWhat's New with Perfecto? - Mid-Year Edition
What's New with Perfecto? - Mid-Year Edition
 
Unit testing_pps
Unit testing_ppsUnit testing_pps
Unit testing_pps
 
100 effective software testing tools that boost your Testing
100 effective software testing tools that boost your Testing100 effective software testing tools that boost your Testing
100 effective software testing tools that boost your Testing
 
QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...
QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...
QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...
 

More from pCloudy

How to generate Synthetic Data for an effective App Testing strategy.pdf
How to generate Synthetic Data for an effective App Testing strategy.pdfHow to generate Synthetic Data for an effective App Testing strategy.pdf
How to generate Synthetic Data for an effective App Testing strategy.pdfpCloudy
 
How to Test Computer Vision Apps like Google Lens and Google Photos.pdf
How to Test Computer Vision Apps like Google Lens and Google Photos.pdfHow to Test Computer Vision Apps like Google Lens and Google Photos.pdf
How to Test Computer Vision Apps like Google Lens and Google Photos.pdfpCloudy
 
Handling iFrames in Selenium Based Test Automation.pdf
Handling iFrames in Selenium Based Test Automation.pdfHandling iFrames in Selenium Based Test Automation.pdf
Handling iFrames in Selenium Based Test Automation.pdfpCloudy
 
What Are Virtual Devices And How To Use Them For Testing.pdf
What Are Virtual Devices And How To Use Them For Testing.pdfWhat Are Virtual Devices And How To Use Them For Testing.pdf
What Are Virtual Devices And How To Use Them For Testing.pdfpCloudy
 
A Complete Guide to Rapid Automation Testing.pdf
A Complete Guide to Rapid Automation Testing.pdfA Complete Guide to Rapid Automation Testing.pdf
A Complete Guide to Rapid Automation Testing.pdfpCloudy
 
Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...
Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...
Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...pCloudy
 
Choosing the Right Testing Strategy to Scale up Mobile App Testing.pdf
Choosing the Right Testing Strategy to Scale up Mobile App Testing.pdfChoosing the Right Testing Strategy to Scale up Mobile App Testing.pdf
Choosing the Right Testing Strategy to Scale up Mobile App Testing.pdfpCloudy
 
Redefining Mobile App Testing pCloudy’s Comprehensive Framework Arsenal.pdf
Redefining Mobile App Testing pCloudy’s Comprehensive Framework Arsenal.pdfRedefining Mobile App Testing pCloudy’s Comprehensive Framework Arsenal.pdf
Redefining Mobile App Testing pCloudy’s Comprehensive Framework Arsenal.pdfpCloudy
 
How to Optimize Apps for Digital Accessibility.pdf
How to Optimize Apps for Digital Accessibility.pdfHow to Optimize Apps for Digital Accessibility.pdf
How to Optimize Apps for Digital Accessibility.pdfpCloudy
 
Understanding public Cloud Cloud Real Devices vs. physical devices, VMs and ...
Understanding public Cloud  Cloud Real Devices vs. physical devices, VMs and ...Understanding public Cloud  Cloud Real Devices vs. physical devices, VMs and ...
Understanding public Cloud Cloud Real Devices vs. physical devices, VMs and ...pCloudy
 
Public Cloud vs. Private Cloud Making the Right Choice for Mobile App Testing...
Public Cloud vs. Private Cloud Making the Right Choice for Mobile App Testing...Public Cloud vs. Private Cloud Making the Right Choice for Mobile App Testing...
Public Cloud vs. Private Cloud Making the Right Choice for Mobile App Testing...pCloudy
 
How does Cross Browser testing improve the User Experience.pdf
How does Cross Browser testing improve the User Experience.pdfHow does Cross Browser testing improve the User Experience.pdf
How does Cross Browser testing improve the User Experience.pdfpCloudy
 
Leveraging Self-Healing Techniques to Foster Sustainable Automation Scripts.pdf
Leveraging Self-Healing Techniques to Foster Sustainable Automation Scripts.pdfLeveraging Self-Healing Techniques to Foster Sustainable Automation Scripts.pdf
Leveraging Self-Healing Techniques to Foster Sustainable Automation Scripts.pdfpCloudy
 
Seamless Integration of Self-Healing Automation into CICD Pipelines.pdf
Seamless Integration of Self-Healing Automation into CICD Pipelines.pdfSeamless Integration of Self-Healing Automation into CICD Pipelines.pdf
Seamless Integration of Self-Healing Automation into CICD Pipelines.pdfpCloudy
 
Summary of Device Coverage Report 2021.pdf
Summary of Device Coverage Report 2021.pdfSummary of Device Coverage Report 2021.pdf
Summary of Device Coverage Report 2021.pdfpCloudy
 
SSTS Inc. Selected For The HPE Digital Catalyst Program.pdf
SSTS Inc. Selected For The HPE Digital Catalyst Program.pdfSSTS Inc. Selected For The HPE Digital Catalyst Program.pdf
SSTS Inc. Selected For The HPE Digital Catalyst Program.pdfpCloudy
 
Test Orchestration and Its Need for Successful Automation (2).pdf
Test Orchestration and Its Need for Successful Automation (2).pdfTest Orchestration and Its Need for Successful Automation (2).pdf
Test Orchestration and Its Need for Successful Automation (2).pdfpCloudy
 
How to use Generative AI to make app testing easy.pdf
How to use Generative AI to make app testing easy.pdfHow to use Generative AI to make app testing easy.pdf
How to use Generative AI to make app testing easy.pdfpCloudy
 
Why Enterprises Should Opt for Cloud-Based Real Device App Testing.pdf
Why Enterprises Should Opt for Cloud-Based Real Device App Testing.pdfWhy Enterprises Should Opt for Cloud-Based Real Device App Testing.pdf
Why Enterprises Should Opt for Cloud-Based Real Device App Testing.pdfpCloudy
 
Tips To Enhance Your Cross Browser Testing With Minimal Effort.pdf
Tips To Enhance Your Cross Browser Testing With Minimal Effort.pdfTips To Enhance Your Cross Browser Testing With Minimal Effort.pdf
Tips To Enhance Your Cross Browser Testing With Minimal Effort.pdfpCloudy
 

More from pCloudy (20)

How to generate Synthetic Data for an effective App Testing strategy.pdf
How to generate Synthetic Data for an effective App Testing strategy.pdfHow to generate Synthetic Data for an effective App Testing strategy.pdf
How to generate Synthetic Data for an effective App Testing strategy.pdf
 
How to Test Computer Vision Apps like Google Lens and Google Photos.pdf
How to Test Computer Vision Apps like Google Lens and Google Photos.pdfHow to Test Computer Vision Apps like Google Lens and Google Photos.pdf
How to Test Computer Vision Apps like Google Lens and Google Photos.pdf
 
Handling iFrames in Selenium Based Test Automation.pdf
Handling iFrames in Selenium Based Test Automation.pdfHandling iFrames in Selenium Based Test Automation.pdf
Handling iFrames in Selenium Based Test Automation.pdf
 
What Are Virtual Devices And How To Use Them For Testing.pdf
What Are Virtual Devices And How To Use Them For Testing.pdfWhat Are Virtual Devices And How To Use Them For Testing.pdf
What Are Virtual Devices And How To Use Them For Testing.pdf
 
A Complete Guide to Rapid Automation Testing.pdf
A Complete Guide to Rapid Automation Testing.pdfA Complete Guide to Rapid Automation Testing.pdf
A Complete Guide to Rapid Automation Testing.pdf
 
Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...
Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...
Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...
 
Choosing the Right Testing Strategy to Scale up Mobile App Testing.pdf
Choosing the Right Testing Strategy to Scale up Mobile App Testing.pdfChoosing the Right Testing Strategy to Scale up Mobile App Testing.pdf
Choosing the Right Testing Strategy to Scale up Mobile App Testing.pdf
 
Redefining Mobile App Testing pCloudy’s Comprehensive Framework Arsenal.pdf
Redefining Mobile App Testing pCloudy’s Comprehensive Framework Arsenal.pdfRedefining Mobile App Testing pCloudy’s Comprehensive Framework Arsenal.pdf
Redefining Mobile App Testing pCloudy’s Comprehensive Framework Arsenal.pdf
 
How to Optimize Apps for Digital Accessibility.pdf
How to Optimize Apps for Digital Accessibility.pdfHow to Optimize Apps for Digital Accessibility.pdf
How to Optimize Apps for Digital Accessibility.pdf
 
Understanding public Cloud Cloud Real Devices vs. physical devices, VMs and ...
Understanding public Cloud  Cloud Real Devices vs. physical devices, VMs and ...Understanding public Cloud  Cloud Real Devices vs. physical devices, VMs and ...
Understanding public Cloud Cloud Real Devices vs. physical devices, VMs and ...
 
Public Cloud vs. Private Cloud Making the Right Choice for Mobile App Testing...
Public Cloud vs. Private Cloud Making the Right Choice for Mobile App Testing...Public Cloud vs. Private Cloud Making the Right Choice for Mobile App Testing...
Public Cloud vs. Private Cloud Making the Right Choice for Mobile App Testing...
 
How does Cross Browser testing improve the User Experience.pdf
How does Cross Browser testing improve the User Experience.pdfHow does Cross Browser testing improve the User Experience.pdf
How does Cross Browser testing improve the User Experience.pdf
 
Leveraging Self-Healing Techniques to Foster Sustainable Automation Scripts.pdf
Leveraging Self-Healing Techniques to Foster Sustainable Automation Scripts.pdfLeveraging Self-Healing Techniques to Foster Sustainable Automation Scripts.pdf
Leveraging Self-Healing Techniques to Foster Sustainable Automation Scripts.pdf
 
Seamless Integration of Self-Healing Automation into CICD Pipelines.pdf
Seamless Integration of Self-Healing Automation into CICD Pipelines.pdfSeamless Integration of Self-Healing Automation into CICD Pipelines.pdf
Seamless Integration of Self-Healing Automation into CICD Pipelines.pdf
 
Summary of Device Coverage Report 2021.pdf
Summary of Device Coverage Report 2021.pdfSummary of Device Coverage Report 2021.pdf
Summary of Device Coverage Report 2021.pdf
 
SSTS Inc. Selected For The HPE Digital Catalyst Program.pdf
SSTS Inc. Selected For The HPE Digital Catalyst Program.pdfSSTS Inc. Selected For The HPE Digital Catalyst Program.pdf
SSTS Inc. Selected For The HPE Digital Catalyst Program.pdf
 
Test Orchestration and Its Need for Successful Automation (2).pdf
Test Orchestration and Its Need for Successful Automation (2).pdfTest Orchestration and Its Need for Successful Automation (2).pdf
Test Orchestration and Its Need for Successful Automation (2).pdf
 
How to use Generative AI to make app testing easy.pdf
How to use Generative AI to make app testing easy.pdfHow to use Generative AI to make app testing easy.pdf
How to use Generative AI to make app testing easy.pdf
 
Why Enterprises Should Opt for Cloud-Based Real Device App Testing.pdf
Why Enterprises Should Opt for Cloud-Based Real Device App Testing.pdfWhy Enterprises Should Opt for Cloud-Based Real Device App Testing.pdf
Why Enterprises Should Opt for Cloud-Based Real Device App Testing.pdf
 
Tips To Enhance Your Cross Browser Testing With Minimal Effort.pdf
Tips To Enhance Your Cross Browser Testing With Minimal Effort.pdfTips To Enhance Your Cross Browser Testing With Minimal Effort.pdf
Tips To Enhance Your Cross Browser Testing With Minimal Effort.pdf
 

Recently uploaded

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Recently uploaded (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

XCUITest for iOS App Testing and how to test with Xcode

  • 1. IOS App testing with XCTest and XCUITest
  • 2. Mobile Testing platforms for developers and testes to test their app on targeted region specific smartphones and networks Who we are?
  • 3. What all we are going to cover?  IOS Automation challenges  Current tool options  Introduction to XCTest and XCUITest  Creating a basic automation script  Understanding impact of XCUITest on Appium
  • 4. IOS Automation challenges  Any Automation tool has for IOS has to rely on Native Test Framework provided by Apple ( UIAutomator or XCUITest)  Native framework have limited set of APIs restricting the type of actions that can be performed on Apps during Automation  IOS App resigning and distribution profile is quite cumbersome.
  • 5. What are the current options for IOS automation? Features/Tools Appium (>1.6 version) Calabash XCTest XCTUITest EarlGrey Type of Mobile Application Supported Native Yes Yes Yes Yes Yes Hybrid Yes Yes Yes Yes Yes Mobile Web Yes No No No No Type of Automation Scripts UI Driven Functional Tests Yes Yes No Yes Yes Unit Tests No No Yes No Yes Scripting Language Java, C#, Ruby, Python, Perl Cucumber, Ruby Objective C, Swift Objective C, Swift Objective C Test Recording capability Partial ( Using Appium Inspector) No Yes Yes No
  • 6. Features/Tools Appium(Including XCUITest) Calabash XCTest XCTUITest EarlGrey Multi Device Execution (on in- house devices) Yes ( Selenium Grid) Framework Dev required Framework Dev required Framework Dev required Framework Dev required Multi Device Execution (on Cloud Platforms like pCloudy) Yes Yes Upcoming Upcoming Upcoming Integration with CI tools (Jenkins) Plug-ins available Plug-ins available Framework Development required Framework Development required Framework Development required Ease of learning medium medium Complex ( For developers) Complex ( For developers) Complex ( For developers) Object Recognition Method Native Object Recognition ( Based on Object Properties) Native Object Recognition ( Based on Object Properties) Native Object Recognition ( Based on Object Properties) Native Object Recognition ( Based on Object Properties) Native Object Recognition ( Based on Object Properties) Support Extremely Active Community Average Supported by Apple Supported by Apple Supported by Google What are the current options?
  • 7. Introduction to XCTest  XCTest is testing framework provided by XCode. Released with XCode 5  XCTest provides the ability to create  Test case subclasses  Test Methods  Assertions  Allows tests to be run directly from the source code  Supports both Objective C and Swift  It can be used as part of CI using XCode server and XCodeBuild.  A significant improvement to the framework with launch of XCUITest wit XCode 7
  • 8. Introduction to XCUITest  XCUITest is combination of XCTest and Accessibility Framework by XCode.  Accessibility framework provides all the API to perform UI actions like Tap, Swipe etc.  XCUITest allows UI Testing  Find elements on UI Interface  Perform UI Actions on those elements  Validate UI properties  In terms of IOS versions , XCUITest can work for IOS 9 and above
  • 9. Let’s understand the ecosystem XCTest XCode XCodeServer XCodeBuild Command Line Tool to build and execute tests. This is used by XcodeServer Used for Continuous Integration. Schedule bot Runs and generate reports IDE where tests be written or recorded Test Framework
  • 10. Concept of Hosting Understanding the difference XCTest .app file XCUITest UI Test Runner .app file Host Application Host Application Target Application Test Bundle Test Bundle
  • 11. Scripting Elements There are three core APIs  XCUIApplications let app = XCUIApplication()  XCUIElements and XCUIElementQuery let emailTextField = app.textFields["Email"] emailTextField.typeText("testmunkdemo@testmunk.com")  Assertion XCTAssertEqual(app.textFields.count, 2);
  • 12. Let’s create a basic test
  • 13. Impact on Appium On IOS, Appium proxies commands to UIAutomation script ( part of Instruments). UI Automation scripts are Java scripts to interact with APP UI.
  • 14. Impact on Appium For IOS 9.x and above UIAutomation with Instruments Deprecated and replaced with All the scripts written with UIA will fail with XCode 8 and can’t be run for IOS 9.3 above versions
  • 15. Impact on Appium The following capabilities need to be set after creating AppiumDriver object to run XCUITest above v9.3 Please refer to the following blog for more information of Appium execution on pCloudy https://www.pcloudy.com/xcuitest-for-ios-apps-and-how-to-test-with-xcode/
  • 16. if (device.getVersion().compareTo(new Version("9.3")) >= 0) { // XCUITest keywords.typeText(By.xpath("//XCUIElementTypeApplication[1]/XCUIElement TypeWindow[1]/XCUIElementTypeOther[1]/XCUIElementTypeTextField[1]"), "test@t estname.com", "Email"); keywords.typeText(By.xpath("//XCUIElementTypeApplication[1]/XCUIElement TypeWindow[1]/XCUIElementTypeOther[1]/XCUIElementTypeSecureTextField[1]"), " testmunk", "Password"); } else { // UIAutomation keywords.typeText(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIATextFiel d[1]"), "test@testname.com", "Email"); keywords.typeText(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIASecureT extField[1]"), "testmunk", "Password"); } XCUITest vs UIAutomation
  • 17. Summary  Launch of XCUITest has made significant impact on IOS automation approach (new and existing)  XCUITest is future for IOS automation.  Appium is still the most popular choice of Automation tool for IOS Apps. It can be used with both UIAutomation for older version and XCUITest with 9.3 above versions.
  • 18. Thank You Let’s change the way Mobile App Testing is performed