ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
XCTest
UITesting in Xcode
ABOUT ME
Sergeev Maxim
QA engineer of 2nd category
@raincoven
raincoven@gmail.com
msergeev@thumbtack.net
2
BRIEFLY ABOUT XCTEST UI
? UI Automation framework by Apple
? Blackbox
? Swift 2.* / ObjectiveC
? iOS9 / Xcode 7 / OS X 10.11
3
FEATURES
? Designed by Apple for Apple
developers
? Test recording
? Test run reports
? Really simple syntax
? Fast test scenario development
4
LET¡¯S START
? open your project in Xcode
? add new testing target
? ¡­
? PROFIT!
5
GENERATED STRUCTURE
6
GENERATED CODE
7
import XCTest
class ListerUITests: XCTestCase {
override func setUp() {
super.setUp()
continueAfterFailure = false
XCUIApplication().launch()
}
override func tearDown() {
super.tearDown()
}
func testExample() {
// Use recording to get started writing UI tests.
}
}
LETS RECORD SOMETEST
8
DISADVANTAGES
? Sometimes selector for element may be very complex
? No page object
? One trait testing
? No documentation
? Only latest iOS version
? Requires separate target
9
SHOULD I USE IT ON MY
PROJECT?
10
LINKS
app:?https://developer.apple.com/sample-code/swift/
downloads/Start-Dev-iOS-Apps-10.zip
ClassReferences:?http://kumarsc.github.io/index.html
Cheat Sheet: http://masilotti.com/ui-testing-cheat-sheet/
WWDC Presentation:?https://developer.apple.com/
videos/play/wwdc2015-406/
11
QUESTIONS?
12
THANKS FOR ATTENTION!
13

More Related Content

?xctest