SlideShare a Scribd company logo
TheMobile DevOps Company
Ville-VeikkoHelppi
HeadofDemandGeneration
ville-veikko.helppi@bitbar.com
GettingStarted with
XCTest andXCUITest
for iOS App Testing
WEBINAR
XCTest&XCUITest
• The State of The Art in iOS App Testing
– Frameworks, Tools & Methods
• The Basics of XCTest & XCUITest –
And How to Get Started
• Alternative iOS Test Automation
Frameworks – Pros and Cons of Each
• Demonstration
• Q&A
Agenda
http://bitbar.com/testing/
More informationabout test
automation frameworks for iOS:
bitbar.com/testing/
PublicCloud
• Device ‘Cloud’ built for internal testing use
• Enterprise-grade testing infrastructure hosted by the
customer
• Usually sits behind customer firewall and connects to
preproduction environments
• Private Device Cloud
• Reserved and Dedicated devices
• Hosted and Fully Managed by Bitbar
• Devices chosen by and reserved exclusively for
customer
• Also known as Testdroid Cloud
• On-demand devices (multi-tenant)
• Mobile App testing on over 1000+ real Android and
iOS devices hosted by Bitbar
Private Cloud
PRODUCT
UPDATE:
XCTest & XCUITest
Support Available On-Premise
XCTest/XCUITest Supported
• Integral framework in Xcode
• Not a new framework: Xcode 5
introduced the first version of XCTest
• Incrementally new
capabilities/features:
o Xcode 6 – performance measurement
o Xcode 7 – UI testing (XCUITest)
• Works with both Swift and Objective-C
XCTest &
XCUITest
What isXCTest/XCUITest?
• Easy to learn, no additional installations or
components required (to Xcode)
• Native iOS language support
• Xcode Test Recorder (for XCUITest)
• Integration with Xcode Server (continuous
integration) and Bots
• Faster than many other popular functional
(and cross-platform) test frameworks
• Works with both Swift and Objective-C
XCTest
Pros of XCTest
• No cross-platform support
• Limited programming language
support
• Selectors may seem complex
• Requires (always) a separate
test target
• Signing can be ‘tricky’
• Sometimes… well, flaky
XCTest
Cons of XCTest
The Status of iOS Test Automation Frameworks
• If you running a test script
built for prior Xcode
versions, all uia_* calls will
raise an error with the latest
Xcode
• When upgrading to Xcode 8
all your existing
UIAutomation scripts will fail
Deprecated
UI Automation
MigratingUIA-> XCTest?
The Basics of
XCTest & XCUITest
and
How to Get Started
New Ebook Available!
Download This Guide
• A test method is an instance
method of a test class that
begins with prefix “test”
• Tests are simply classes and
methods and e.g. @property
and helper methods can be
added to the class
XCTest &
XCUITest
Getting Started
-(void)testExample {
XCTAssert(...);
XCTAssertTrue(...);
XCTAssertFalse(...);
}
• Tests are grouped into
classes that are subclass
from XCTestCase
XCTest &
XCUITest
WritingTest Methods
class DemoTest: XCTestCase {
- (void)testExample {
// This is an example of a functional test case.
// Use XCTAssert and related functions
}
- (void)testPerformanceExample {
// This is an example of a performance test case.
[self measureBlock:^{
// Put the code you want to measure the time of here.
}];
}
}
XCTest &
XCUITest
XCTestCase Example - Swift
import UIKit
import XCTest
@testable import LocalizationDemo
class LocalizationDemoTests: XCTestCase {
override func setUp() {
super.setUp()
}
override func tearDown() {
super.tearDown()
}
func testMyModel() {
// Example of a functional test case.
var model = MyModel(name: "first", surname: "last");
XCTAssertEqual(model.a, "first");
XCTAssertNotEqual(model.b, "first");
}
func testIfLocalizationWorks() {
// This is an example of a functional test case.
XCTAssert(true, "Pass")
}
}
• A performance test takes a block of code
(that is measured) and runs it ten times,
collecting the average execution time and
the standard deviation for the runs
XCTest &
XCUITest
WritingPerformance Tests
- (void) testAdditionPerformance {
[self measureBlock:^{
// set the initial state
[calcViewController press:[calcView viewWithTag: 6]];
// iterate for 100000 cycles of adding 2
for (int i=0; i<100000; i++) {
[calcViewController press:[calcView
viewWithTag:13]];
[calcViewController press:[calcView viewWithTag:
2]];
[calcViewController press:[calcView
viewWithTag:12]];
}
}];
}
XCUIApplication
• The XCUIApplication is basically a
proxy for an app that can be launched
and terminated
• User can tell the application to run in
testing mode by defining app as a
“Target Application” in Xcode target
settings
Code Syntax (XCUITest)
// Objective-C
XCUIApplication *app = [[XCUIApplication alloc] init];
// Swift
let app = XCUIApplication()
XCUIElement
• XCUIElement is the
actual UI element in
an iOS application
• XCUIElement
provides all the basics
symbols and
functions for UI
element interactions
• Gestures with XCTest
include clicking UI
elements (normal,
double, pressing),
interacting with the
screen (swipe, pinch,
zoom, rotate etc.)
Code Syntax (XCUITest)
// Click-based functions
tap()
doubleTap()
twoFingerTap()
tap(withNumberOfTaps: UInt, numberOfTouches: UInt)
press(forDuration: TimeInterval)
press(forDuration: TimeInterval, thenDragTo: XCUIElement)
// Generic UI interactions
swipeLeft()
swipeRight()
swipeUp()
swipeDown()
pinch(withScale: CGFloat, velocity: CGFloat)
rotate(CGFloat, withVelocity: CGFloat)
XCUIElement
• XCUIElement is
constructed using
the actual user
interface elements
on the screen
• XCUIElement
inherits from
NSObject
• In order to perform
any interaction (tap
on this example) on
a UI element the UI
interactions are
available for use.
Code Syntax (XCUITest)
XCUIApplication *app = [[XCUIApplication alloc] init];
XCUIElement *masterNavigationBar =
app.navigationBars[@"Master"];
XCUIElement *editButton =
masterNavigationBar.buttons[@"Edit"];
// Objective-C
[masterNavigationBar.staticTexts[@"Master"] tap];
[editButton tap];
• Two ways to create IPA for
test automation
1. Working with Xcode
2. Working from Command Line
• Test package can be built as
APP file and zipped for
cloud execution
Preparing IPA and
Test Package for
Simultaneous
Device Runs
Methods to Create IPAand Test Package for
Simultaneous Tests
• By archiving any build package will
be compatible with an iOS device
• When your build is done and
archiving has finished, select the
build from Archive list and click
“Export…”
Working on
Xcode to Create
IPA for Testing
1. Archive Your Build
• When the following window is
shown, simply select “Save for Ad
Hoc Deployment” and click Next.
Working on
Xcode to Create
IPA for Testing
2. Select The Right Method
• Use the same identify what you use in
build settings for code signing.
• If your project and Xcode is properly
configured you should see the following
type of dialog proposing the first usable
identifier:
Working on
Xcode to Create
IPA for Testing
3. Identify Yourself(andYourBuild)
• It’s almost always recommended to include
all possible device support for your app.
• If you want to reduce the size of your IPA
you can shrink it by selecting to support only
certain devices and OS versions
Working on
Xcode to Create
IPA for Testing
4. Select OS and Devices
• This can be done Product -> Build
for -> Testing menu:
Working on
Command Line to
Create IPA for
Testing
1. Select toBuildfor Testing
• Next, select your project in Project
Navigator and right click to “Show it in
Finder”:
Working on
Command Line to
Create IPA for
Testing
2. Locate App Fileon HD
• After Finder dialog has been opened
and files are shown, just highlight the
.app file and right-click to see copying
option, as follows:
Working on
Command Line to
Create IPA for
Testing
3. Copy App FileProperly
• After Finder dialog has been opened
and files are shown, just highlight the
.app file and right-click to see copying
option, as follows:
Working on
Command Line to
Create IPA for
Testing
4. Create IPA from CMD
$ mkdir /tmp/Payload
$ cd /tmp/Payload
$ cp -r /User/Path/Debug-iphoneos/LocalizationDemo.app .
$ cd ..
$ zip --symlinks -qr "LocalizationDemo.ipa" Payload
$ ls -lrt LocalizationDemo.ipa
-rw-r--r-- 1 username staff 0 Dec 16 12:42 LocalizationDemo.ipa
• If building for iPhone 5 or iPhone 5C (with
ARMv7 32-bit processor) devices, additional
step is needed before creating the build.
• Starting from Xcode 7, armv7s is no more part
of the default $(ARCHS_STANDARD) and so
should be added as a target build architecture
Creating an IPA
for iOS App
Testing
Good To Know!
Quick
XCTest/XCUITest
Comparison
Ebooks Available for…
XCTest/
XCUITest
Calabash Appium
Top 3 iOS Test Automation Frameworks
XCTEST/XCUITEST APPIUM CALABASH
CROSS-PLATFORM No Yes Yes
IOS Yes Yes Yes
MOBILE WEB Yes Yes No
LANGUAGE Obj-C/Swift Almost any Ruby
TOOL FOR TEST
CREATION
Xcode Appium.app CLI
(Human-Readable syntax)
COMMUNITY Apple Community Community
Demo
Xcode 6 / 7 / 8
Summary– Q&A
Moreinformationaboutmobileapptesting,
mobilemonitoringandmobiledevopsat
bitbar.com

More Related Content

What's hot

Selenium IDE LOCATORS
Selenium IDE LOCATORSSelenium IDE LOCATORS
Selenium IDE LOCATORS
Mindfire Solutions
 
Katalon Studio Presentation.pptx
Katalon Studio Presentation.pptxKatalon Studio Presentation.pptx
Katalon Studio Presentation.pptx
MuhammadHassan440279
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
Naresh Chintalcheru
 
Unit Testing in Angular
Unit Testing in AngularUnit Testing in Angular
Unit Testing in Angular
Knoldus Inc.
 
Cross browser testing with browser stack
Cross browser testing with browser stackCross browser testing with browser stack
Cross browser testing with browser stack
Denys Poloka
 
TestComplete – A Sophisticated Automated Testing Tool by SmartBear
TestComplete – A Sophisticated Automated Testing Tool by SmartBearTestComplete – A Sophisticated Automated Testing Tool by SmartBear
TestComplete – A Sophisticated Automated Testing Tool by SmartBear
Software Testing Solution
 
Browser_Stack_Intro
Browser_Stack_IntroBrowser_Stack_Intro
Browser_Stack_Intro
Mithilesh Singh
 
Selenium 4 with Simon Stewart [Webinar]
Selenium 4 with Simon Stewart [Webinar]Selenium 4 with Simon Stewart [Webinar]
Selenium 4 with Simon Stewart [Webinar]
BrowserStack
 
TestNG Session presented in PB
TestNG Session presented in PBTestNG Session presented in PB
TestNG Session presented in PB
Abhishek Yadav
 
Xpath in Selenium | Selenium Xpath Tutorial | Selenium Xpath Examples | Selen...
Xpath in Selenium | Selenium Xpath Tutorial | Selenium Xpath Examples | Selen...Xpath in Selenium | Selenium Xpath Tutorial | Selenium Xpath Examples | Selen...
Xpath in Selenium | Selenium Xpath Tutorial | Selenium Xpath Examples | Selen...
Edureka!
 
Automation Testing With Appium
Automation Testing With AppiumAutomation Testing With Appium
Automation Testing With Appium
Knoldus Inc.
 
Appium ppt
Appium pptAppium ppt
Appium ppt
natashasweety7
 
Gherkin /BDD intro
Gherkin /BDD introGherkin /BDD intro
Test automation using selenium
Test automation using seleniumTest automation using selenium
Test automation using selenium
shreyas JC
 
Introduction to AWS Device Farm
Introduction to AWS Device FarmIntroduction to AWS Device Farm
Introduction to AWS Device Farm
Amazon Web Services
 
Intro to Visual Test Automation with Applitools Eyes
Intro to Visual Test Automation with Applitools Eyes Intro to Visual Test Automation with Applitools Eyes
Intro to Visual Test Automation with Applitools Eyes
Applitools
 
Jenkins Introduction
Jenkins IntroductionJenkins Introduction
Jenkins Introduction
Pavan Gupta
 
Angular Unit Testing
Angular Unit TestingAngular Unit Testing
Angular Unit Testing
Alessandro Giorgetti
 
Ui testing in xcode
Ui testing in xcodeUi testing in xcode
Ui testing in xcode
allanh0526
 
Web automation using selenium.ppt
Web automation using selenium.pptWeb automation using selenium.ppt
Web automation using selenium.ppt
Ana Sarbescu
 

What's hot (20)

Selenium IDE LOCATORS
Selenium IDE LOCATORSSelenium IDE LOCATORS
Selenium IDE LOCATORS
 
Katalon Studio Presentation.pptx
Katalon Studio Presentation.pptxKatalon Studio Presentation.pptx
Katalon Studio Presentation.pptx
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
 
Unit Testing in Angular
Unit Testing in AngularUnit Testing in Angular
Unit Testing in Angular
 
Cross browser testing with browser stack
Cross browser testing with browser stackCross browser testing with browser stack
Cross browser testing with browser stack
 
TestComplete – A Sophisticated Automated Testing Tool by SmartBear
TestComplete – A Sophisticated Automated Testing Tool by SmartBearTestComplete – A Sophisticated Automated Testing Tool by SmartBear
TestComplete – A Sophisticated Automated Testing Tool by SmartBear
 
Browser_Stack_Intro
Browser_Stack_IntroBrowser_Stack_Intro
Browser_Stack_Intro
 
Selenium 4 with Simon Stewart [Webinar]
Selenium 4 with Simon Stewart [Webinar]Selenium 4 with Simon Stewart [Webinar]
Selenium 4 with Simon Stewart [Webinar]
 
TestNG Session presented in PB
TestNG Session presented in PBTestNG Session presented in PB
TestNG Session presented in PB
 
Xpath in Selenium | Selenium Xpath Tutorial | Selenium Xpath Examples | Selen...
Xpath in Selenium | Selenium Xpath Tutorial | Selenium Xpath Examples | Selen...Xpath in Selenium | Selenium Xpath Tutorial | Selenium Xpath Examples | Selen...
Xpath in Selenium | Selenium Xpath Tutorial | Selenium Xpath Examples | Selen...
 
Automation Testing With Appium
Automation Testing With AppiumAutomation Testing With Appium
Automation Testing With Appium
 
Appium ppt
Appium pptAppium ppt
Appium ppt
 
Gherkin /BDD intro
Gherkin /BDD introGherkin /BDD intro
Gherkin /BDD intro
 
Test automation using selenium
Test automation using seleniumTest automation using selenium
Test automation using selenium
 
Introduction to AWS Device Farm
Introduction to AWS Device FarmIntroduction to AWS Device Farm
Introduction to AWS Device Farm
 
Intro to Visual Test Automation with Applitools Eyes
Intro to Visual Test Automation with Applitools Eyes Intro to Visual Test Automation with Applitools Eyes
Intro to Visual Test Automation with Applitools Eyes
 
Jenkins Introduction
Jenkins IntroductionJenkins Introduction
Jenkins Introduction
 
Angular Unit Testing
Angular Unit TestingAngular Unit Testing
Angular Unit Testing
 
Ui testing in xcode
Ui testing in xcodeUi testing in xcode
Ui testing in xcode
 
Web automation using selenium.ppt
Web automation using selenium.pptWeb automation using selenium.ppt
Web automation using selenium.ppt
 

Similar to Getting Started with XCTest and XCUITest for iOS App Testing

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
Emanuel Amiguinho
 
XCUITest for iOS App Testing and how to test with Xcode
XCUITest for iOS App Testing and how to test with XcodeXCUITest for iOS App Testing and how to test with Xcode
XCUITest for iOS App Testing and how to test with Xcode
pCloudy
 
Calabash for iPhone apps
Calabash for iPhone appsCalabash for iPhone apps
Calabash for iPhone apps
Chathura palihakkara
 
Automating Mobile Applications
Automating Mobile ApplicationsAutomating Mobile Applications
Automating Mobile Applications
April Luk
 
JBCN_Testing_With_Containers
JBCN_Testing_With_ContainersJBCN_Testing_With_Containers
JBCN_Testing_With_Containers
Grace Jansen
 
iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application Security
Egor Tolstoy
 
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
 
JLove - Replicating production on your laptop using the magic of containers
JLove - Replicating production on your laptop using the magic of containersJLove - Replicating production on your laptop using the magic of containers
JLove - Replicating production on your laptop using the magic of containers
Grace Jansen
 
iOS Application Exploitation
iOS Application ExploitationiOS Application Exploitation
iOS Application Exploitation
Positive Hack Days
 
IOS ecosystem
IOS ecosystemIOS ecosystem
IOS ecosystem
Paolo Tagliani
 
2012 java one-con3648
2012 java one-con36482012 java one-con3648
2012 java one-con3648Eing Ong
 
Advanced Coded UI Testing
Advanced Coded UI TestingAdvanced Coded UI Testing
Advanced Coded UI Testing
Shai Raiten
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator PresentationAaron Saunders
 
Fashionable XCUITest for iOS Apps by Shashikant Jagtap
Fashionable XCUITest for iOS Apps by Shashikant JagtapFashionable XCUITest for iOS Apps by Shashikant Jagtap
Fashionable XCUITest for iOS Apps by Shashikant Jagtap
Sauce Labs
 
Hudson
HudsonHudson
Hudson
8x8
 
Ci for i-os-codemash-01.2013
Ci for i-os-codemash-01.2013Ci for i-os-codemash-01.2013
Ci for i-os-codemash-01.2013
Kevin Munc
 
SauceCon19: Fashionable XCUITest for iOS App
SauceCon19: Fashionable XCUITest for iOS App SauceCon19: Fashionable XCUITest for iOS App
SauceCon19: Fashionable XCUITest for iOS App
Shashikant Jagtap
 
Run somke test on AWS DeviceFarm
Run somke test on AWS DeviceFarmRun somke test on AWS DeviceFarm
Run somke test on AWS DeviceFarm
Naoki AINOYA
 

Similar to Getting Started with XCTest and XCUITest for iOS App Testing (20)

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
 
XCUITest for iOS App Testing and how to test with Xcode
XCUITest for iOS App Testing and how to test with XcodeXCUITest for iOS App Testing and how to test with Xcode
XCUITest for iOS App Testing and how to test with Xcode
 
Calabash for iPhone apps
Calabash for iPhone appsCalabash for iPhone apps
Calabash for iPhone apps
 
Automating Mobile Applications
Automating Mobile ApplicationsAutomating Mobile Applications
Automating Mobile Applications
 
JBCN_Testing_With_Containers
JBCN_Testing_With_ContainersJBCN_Testing_With_Containers
JBCN_Testing_With_Containers
 
iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application Security
 
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
 
JLove - Replicating production on your laptop using the magic of containers
JLove - Replicating production on your laptop using the magic of containersJLove - Replicating production on your laptop using the magic of containers
JLove - Replicating production on your laptop using the magic of containers
 
iOS Application Exploitation
iOS Application ExploitationiOS Application Exploitation
iOS Application Exploitation
 
IOS ecosystem
IOS ecosystemIOS ecosystem
IOS ecosystem
 
2012 java one-con3648
2012 java one-con36482012 java one-con3648
2012 java one-con3648
 
Advanced Coded UI Testing
Advanced Coded UI TestingAdvanced Coded UI Testing
Advanced Coded UI Testing
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator Presentation
 
Fashionable XCUITest for iOS Apps by Shashikant Jagtap
Fashionable XCUITest for iOS Apps by Shashikant JagtapFashionable XCUITest for iOS Apps by Shashikant Jagtap
Fashionable XCUITest for iOS Apps by Shashikant Jagtap
 
Hudson
HudsonHudson
Hudson
 
Ci for i-os-codemash-01.2013
Ci for i-os-codemash-01.2013Ci for i-os-codemash-01.2013
Ci for i-os-codemash-01.2013
 
SauceCon19: Fashionable XCUITest for iOS App
SauceCon19: Fashionable XCUITest for iOS App SauceCon19: Fashionable XCUITest for iOS App
SauceCon19: Fashionable XCUITest for iOS App
 
Run somke test on AWS DeviceFarm
Run somke test on AWS DeviceFarmRun somke test on AWS DeviceFarm
Run somke test on AWS DeviceFarm
 
tut0000021-hevery
tut0000021-heverytut0000021-hevery
tut0000021-hevery
 
tut0000021-hevery
tut0000021-heverytut0000021-hevery
tut0000021-hevery
 

More from Bitbar

The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...
The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...
The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...
Bitbar
 
Mobile performance metrics and performance monitoring meetup 2017 05 10
Mobile performance metrics and performance monitoring meetup 2017 05 10Mobile performance metrics and performance monitoring meetup 2017 05 10
Mobile performance metrics and performance monitoring meetup 2017 05 10
Bitbar
 
Exercising and Scaling Up Mobile DevOps in the Enterprise
Exercising and Scaling Up Mobile DevOps in the EnterpriseExercising and Scaling Up Mobile DevOps in the Enterprise
Exercising and Scaling Up Mobile DevOps in the Enterprise
Bitbar
 
Hassle-Free Continuous Integration with Real Device Testing
Hassle-Free Continuous Integration with Real Device TestingHassle-Free Continuous Integration with Real Device Testing
Hassle-Free Continuous Integration with Real Device Testing
Bitbar
 
Best Practices for DevOps in Mobile App Testing
Best Practices for DevOps in Mobile App TestingBest Practices for DevOps in Mobile App Testing
Best Practices for DevOps in Mobile App Testing
Bitbar
 
Ensure Your Mobile Channels Generate Revenue on Holiday Peak Days
Ensure Your Mobile Channels Generate Revenue on Holiday Peak DaysEnsure Your Mobile Channels Generate Revenue on Holiday Peak Days
Ensure Your Mobile Channels Generate Revenue on Holiday Peak Days
Bitbar
 
How to Reliably Measure and Optimize Graphics Performance of Your Android Games
How to Reliably Measure and Optimize Graphics Performance of Your Android GamesHow to Reliably Measure and Optimize Graphics Performance of Your Android Games
How to Reliably Measure and Optimize Graphics Performance of Your Android Games
Bitbar
 
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarParallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Bitbar
 
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
Bitbar
 
The Powerful and Comprehensive API for Mobile App Development and Testing
The Powerful and Comprehensive API for Mobile App Development and TestingThe Powerful and Comprehensive API for Mobile App Development and Testing
The Powerful and Comprehensive API for Mobile App Development and Testing
Bitbar
 
Which One Works You The Best: In-House or Cloud-Based Development Environment
Which One Works You The Best: In-House or Cloud-Based Development EnvironmentWhich One Works You The Best: In-House or Cloud-Based Development Environment
Which One Works You The Best: In-House or Cloud-Based Development Environment
Bitbar
 
Best Practices in Mobile Game Testing
Best Practices in Mobile Game TestingBest Practices in Mobile Game Testing
Best Practices in Mobile Game Testing
Bitbar
 
Build a Large Scale In-House Test Lab for Mobile Apps
Build a Large Scale In-House Test Lab for Mobile AppsBuild a Large Scale In-House Test Lab for Mobile Apps
Build a Large Scale In-House Test Lab for Mobile Apps
Bitbar
 
The Status of Android Hardware and Software - From App Developer's Point of View
The Status of Android Hardware and Software - From App Developer's Point of ViewThe Status of Android Hardware and Software - From App Developer's Point of View
The Status of Android Hardware and Software - From App Developer's Point of View
Bitbar
 
Do You Enjoy Espresso in Android App Testing?
Do You Enjoy Espresso in Android App Testing?Do You Enjoy Espresso in Android App Testing?
Do You Enjoy Espresso in Android App Testing?
Bitbar
 
Testing Your Android and iOS Apps with Appium in Testdroid Cloud
Testing Your Android and iOS Apps with Appium in Testdroid CloudTesting Your Android and iOS Apps with Appium in Testdroid Cloud
Testing Your Android and iOS Apps with Appium in Testdroid Cloud
Bitbar
 
How to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App TestingHow to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App Testing
Bitbar
 
How to Test Security and Vulnerability of Your Android and iOS Apps
How to Test Security and Vulnerability of Your Android and iOS AppsHow to Test Security and Vulnerability of Your Android and iOS Apps
How to Test Security and Vulnerability of Your Android and iOS Apps
Bitbar
 
Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?
Bitbar
 
Maximize the Benefits from Your Test Automation Investment
Maximize the Benefits from Your Test Automation InvestmentMaximize the Benefits from Your Test Automation Investment
Maximize the Benefits from Your Test Automation Investment
Bitbar
 

More from Bitbar (20)

The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...
The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...
The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...
 
Mobile performance metrics and performance monitoring meetup 2017 05 10
Mobile performance metrics and performance monitoring meetup 2017 05 10Mobile performance metrics and performance monitoring meetup 2017 05 10
Mobile performance metrics and performance monitoring meetup 2017 05 10
 
Exercising and Scaling Up Mobile DevOps in the Enterprise
Exercising and Scaling Up Mobile DevOps in the EnterpriseExercising and Scaling Up Mobile DevOps in the Enterprise
Exercising and Scaling Up Mobile DevOps in the Enterprise
 
Hassle-Free Continuous Integration with Real Device Testing
Hassle-Free Continuous Integration with Real Device TestingHassle-Free Continuous Integration with Real Device Testing
Hassle-Free Continuous Integration with Real Device Testing
 
Best Practices for DevOps in Mobile App Testing
Best Practices for DevOps in Mobile App TestingBest Practices for DevOps in Mobile App Testing
Best Practices for DevOps in Mobile App Testing
 
Ensure Your Mobile Channels Generate Revenue on Holiday Peak Days
Ensure Your Mobile Channels Generate Revenue on Holiday Peak DaysEnsure Your Mobile Channels Generate Revenue on Holiday Peak Days
Ensure Your Mobile Channels Generate Revenue on Holiday Peak Days
 
How to Reliably Measure and Optimize Graphics Performance of Your Android Games
How to Reliably Measure and Optimize Graphics Performance of Your Android GamesHow to Reliably Measure and Optimize Graphics Performance of Your Android Games
How to Reliably Measure and Optimize Graphics Performance of Your Android Games
 
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarParallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
 
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
 
The Powerful and Comprehensive API for Mobile App Development and Testing
The Powerful and Comprehensive API for Mobile App Development and TestingThe Powerful and Comprehensive API for Mobile App Development and Testing
The Powerful and Comprehensive API for Mobile App Development and Testing
 
Which One Works You The Best: In-House or Cloud-Based Development Environment
Which One Works You The Best: In-House or Cloud-Based Development EnvironmentWhich One Works You The Best: In-House or Cloud-Based Development Environment
Which One Works You The Best: In-House or Cloud-Based Development Environment
 
Best Practices in Mobile Game Testing
Best Practices in Mobile Game TestingBest Practices in Mobile Game Testing
Best Practices in Mobile Game Testing
 
Build a Large Scale In-House Test Lab for Mobile Apps
Build a Large Scale In-House Test Lab for Mobile AppsBuild a Large Scale In-House Test Lab for Mobile Apps
Build a Large Scale In-House Test Lab for Mobile Apps
 
The Status of Android Hardware and Software - From App Developer's Point of View
The Status of Android Hardware and Software - From App Developer's Point of ViewThe Status of Android Hardware and Software - From App Developer's Point of View
The Status of Android Hardware and Software - From App Developer's Point of View
 
Do You Enjoy Espresso in Android App Testing?
Do You Enjoy Espresso in Android App Testing?Do You Enjoy Espresso in Android App Testing?
Do You Enjoy Espresso in Android App Testing?
 
Testing Your Android and iOS Apps with Appium in Testdroid Cloud
Testing Your Android and iOS Apps with Appium in Testdroid CloudTesting Your Android and iOS Apps with Appium in Testdroid Cloud
Testing Your Android and iOS Apps with Appium in Testdroid Cloud
 
How to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App TestingHow to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App Testing
 
How to Test Security and Vulnerability of Your Android and iOS Apps
How to Test Security and Vulnerability of Your Android and iOS AppsHow to Test Security and Vulnerability of Your Android and iOS Apps
How to Test Security and Vulnerability of Your Android and iOS Apps
 
Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?
 
Maximize the Benefits from Your Test Automation Investment
Maximize the Benefits from Your Test Automation InvestmentMaximize the Benefits from Your Test Automation Investment
Maximize the Benefits from Your Test Automation Investment
 

Recently uploaded

IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 

Recently uploaded (20)

IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 

Getting Started with XCTest and XCUITest for iOS App Testing

  • 2. XCTest&XCUITest • The State of The Art in iOS App Testing – Frameworks, Tools & Methods • The Basics of XCTest & XCUITest – And How to Get Started • Alternative iOS Test Automation Frameworks – Pros and Cons of Each • Demonstration • Q&A Agenda http://bitbar.com/testing/ More informationabout test automation frameworks for iOS: bitbar.com/testing/
  • 3. PublicCloud • Device ‘Cloud’ built for internal testing use • Enterprise-grade testing infrastructure hosted by the customer • Usually sits behind customer firewall and connects to preproduction environments • Private Device Cloud • Reserved and Dedicated devices • Hosted and Fully Managed by Bitbar • Devices chosen by and reserved exclusively for customer • Also known as Testdroid Cloud • On-demand devices (multi-tenant) • Mobile App testing on over 1000+ real Android and iOS devices hosted by Bitbar Private Cloud PRODUCT UPDATE: XCTest & XCUITest Support Available On-Premise XCTest/XCUITest Supported
  • 4. • Integral framework in Xcode • Not a new framework: Xcode 5 introduced the first version of XCTest • Incrementally new capabilities/features: o Xcode 6 – performance measurement o Xcode 7 – UI testing (XCUITest) • Works with both Swift and Objective-C XCTest & XCUITest What isXCTest/XCUITest?
  • 5. • Easy to learn, no additional installations or components required (to Xcode) • Native iOS language support • Xcode Test Recorder (for XCUITest) • Integration with Xcode Server (continuous integration) and Bots • Faster than many other popular functional (and cross-platform) test frameworks • Works with both Swift and Objective-C XCTest Pros of XCTest
  • 6. • No cross-platform support • Limited programming language support • Selectors may seem complex • Requires (always) a separate test target • Signing can be ‘tricky’ • Sometimes… well, flaky XCTest Cons of XCTest
  • 7. The Status of iOS Test Automation Frameworks
  • 8. • If you running a test script built for prior Xcode versions, all uia_* calls will raise an error with the latest Xcode • When upgrading to Xcode 8 all your existing UIAutomation scripts will fail Deprecated UI Automation MigratingUIA-> XCTest?
  • 9. The Basics of XCTest & XCUITest and How to Get Started New Ebook Available! Download This Guide
  • 10. • A test method is an instance method of a test class that begins with prefix “test” • Tests are simply classes and methods and e.g. @property and helper methods can be added to the class XCTest & XCUITest Getting Started -(void)testExample { XCTAssert(...); XCTAssertTrue(...); XCTAssertFalse(...); }
  • 11. • Tests are grouped into classes that are subclass from XCTestCase XCTest & XCUITest WritingTest Methods class DemoTest: XCTestCase { - (void)testExample { // This is an example of a functional test case. // Use XCTAssert and related functions } - (void)testPerformanceExample { // This is an example of a performance test case. [self measureBlock:^{ // Put the code you want to measure the time of here. }]; } }
  • 12. XCTest & XCUITest XCTestCase Example - Swift import UIKit import XCTest @testable import LocalizationDemo class LocalizationDemoTests: XCTestCase { override func setUp() { super.setUp() } override func tearDown() { super.tearDown() } func testMyModel() { // Example of a functional test case. var model = MyModel(name: "first", surname: "last"); XCTAssertEqual(model.a, "first"); XCTAssertNotEqual(model.b, "first"); } func testIfLocalizationWorks() { // This is an example of a functional test case. XCTAssert(true, "Pass") } }
  • 13. • A performance test takes a block of code (that is measured) and runs it ten times, collecting the average execution time and the standard deviation for the runs XCTest & XCUITest WritingPerformance Tests - (void) testAdditionPerformance { [self measureBlock:^{ // set the initial state [calcViewController press:[calcView viewWithTag: 6]]; // iterate for 100000 cycles of adding 2 for (int i=0; i<100000; i++) { [calcViewController press:[calcView viewWithTag:13]]; [calcViewController press:[calcView viewWithTag: 2]]; [calcViewController press:[calcView viewWithTag:12]]; } }]; }
  • 14. XCUIApplication • The XCUIApplication is basically a proxy for an app that can be launched and terminated • User can tell the application to run in testing mode by defining app as a “Target Application” in Xcode target settings Code Syntax (XCUITest) // Objective-C XCUIApplication *app = [[XCUIApplication alloc] init]; // Swift let app = XCUIApplication()
  • 15. XCUIElement • XCUIElement is the actual UI element in an iOS application • XCUIElement provides all the basics symbols and functions for UI element interactions • Gestures with XCTest include clicking UI elements (normal, double, pressing), interacting with the screen (swipe, pinch, zoom, rotate etc.) Code Syntax (XCUITest) // Click-based functions tap() doubleTap() twoFingerTap() tap(withNumberOfTaps: UInt, numberOfTouches: UInt) press(forDuration: TimeInterval) press(forDuration: TimeInterval, thenDragTo: XCUIElement) // Generic UI interactions swipeLeft() swipeRight() swipeUp() swipeDown() pinch(withScale: CGFloat, velocity: CGFloat) rotate(CGFloat, withVelocity: CGFloat)
  • 16. XCUIElement • XCUIElement is constructed using the actual user interface elements on the screen • XCUIElement inherits from NSObject • In order to perform any interaction (tap on this example) on a UI element the UI interactions are available for use. Code Syntax (XCUITest) XCUIApplication *app = [[XCUIApplication alloc] init]; XCUIElement *masterNavigationBar = app.navigationBars[@"Master"]; XCUIElement *editButton = masterNavigationBar.buttons[@"Edit"]; // Objective-C [masterNavigationBar.staticTexts[@"Master"] tap]; [editButton tap];
  • 17. • Two ways to create IPA for test automation 1. Working with Xcode 2. Working from Command Line • Test package can be built as APP file and zipped for cloud execution Preparing IPA and Test Package for Simultaneous Device Runs Methods to Create IPAand Test Package for Simultaneous Tests
  • 18. • By archiving any build package will be compatible with an iOS device • When your build is done and archiving has finished, select the build from Archive list and click “Export…” Working on Xcode to Create IPA for Testing 1. Archive Your Build
  • 19. • When the following window is shown, simply select “Save for Ad Hoc Deployment” and click Next. Working on Xcode to Create IPA for Testing 2. Select The Right Method
  • 20. • Use the same identify what you use in build settings for code signing. • If your project and Xcode is properly configured you should see the following type of dialog proposing the first usable identifier: Working on Xcode to Create IPA for Testing 3. Identify Yourself(andYourBuild)
  • 21. • It’s almost always recommended to include all possible device support for your app. • If you want to reduce the size of your IPA you can shrink it by selecting to support only certain devices and OS versions Working on Xcode to Create IPA for Testing 4. Select OS and Devices
  • 22. • This can be done Product -> Build for -> Testing menu: Working on Command Line to Create IPA for Testing 1. Select toBuildfor Testing
  • 23. • Next, select your project in Project Navigator and right click to “Show it in Finder”: Working on Command Line to Create IPA for Testing 2. Locate App Fileon HD
  • 24. • After Finder dialog has been opened and files are shown, just highlight the .app file and right-click to see copying option, as follows: Working on Command Line to Create IPA for Testing 3. Copy App FileProperly
  • 25. • After Finder dialog has been opened and files are shown, just highlight the .app file and right-click to see copying option, as follows: Working on Command Line to Create IPA for Testing 4. Create IPA from CMD $ mkdir /tmp/Payload $ cd /tmp/Payload $ cp -r /User/Path/Debug-iphoneos/LocalizationDemo.app . $ cd .. $ zip --symlinks -qr "LocalizationDemo.ipa" Payload $ ls -lrt LocalizationDemo.ipa -rw-r--r-- 1 username staff 0 Dec 16 12:42 LocalizationDemo.ipa
  • 26. • If building for iPhone 5 or iPhone 5C (with ARMv7 32-bit processor) devices, additional step is needed before creating the build. • Starting from Xcode 7, armv7s is no more part of the default $(ARCHS_STANDARD) and so should be added as a target build architecture Creating an IPA for iOS App Testing Good To Know!
  • 28. Top 3 iOS Test Automation Frameworks XCTEST/XCUITEST APPIUM CALABASH CROSS-PLATFORM No Yes Yes IOS Yes Yes Yes MOBILE WEB Yes Yes No LANGUAGE Obj-C/Swift Almost any Ruby TOOL FOR TEST CREATION Xcode Appium.app CLI (Human-Readable syntax) COMMUNITY Apple Community Community
  • 29. Demo Xcode 6 / 7 / 8