XCTest - Command Line Unit Test
Links_
Resources
- An overview of UI testing in Xcode 7
- WWDC 2015 session 406, UI Testing in Xcode.
- XCTestCase Class Reference
- How to test UI changes in Xcode 7
- Why hitting the network is bad for your test, and what to do about it
- UI Testing Cheat Sheet and Examples
- NSHipster on XCTestCase / XCTestExpectation / measureBlock()
- UI Testing Cheatsheet
- Natasha The Robot, on about
@testable
Questions
- Q: What, if any system dialog boxes can the app produce?
A: ? location (For stores etc) -
Q: Do we use
UIAutomation
and it so is it being phased out in favour ofXCTest
?
A: ?Also NSPredicate
- Setting Jenkins up to run XCTool and Xcode Simulator Tests
- iOS CI with Jenkins
Related Projects
- FBSimulatorControl: An OS X library for managing and manipulating iOS Simulators. Also fbsimctl which is the command line tool.
What devices do we need to test against :
- iPhone 4S, 5, 5S, 5C, 6, 6+, 6S, 6S+, SE
- iPad 2, 3, 4, Air, Air 2, Pro, Mini, Mini 2, Mini 3
- iPod Touch 5G
And what iOS versions
- 8.0, 9.2
We could do with the usage stats for these products / versions
UI Testing
A handy Cheatsheet and some gotchas.
TODO: In /Users/ci/.jenkins/workspace/iOS-DevelopNightly/src
, a xctool -workspace MyAwesomeApp.xcworkspace -scheme Debug test
Should work - but fails.
Note to be confued with XCTest UI
xcodebuild \
-workspace MyAwesomeApp.xcworkspace \
-scheme MyAwesomeApp \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 6,OS=8.1' \
test
Gives:
xcodebuild \
-workspace MyAwesomeApp.xcworkspace \
-scheme Nightly \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 6,OS=9.3' \
test \
| \
xcpretty