![Page 1: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/1.jpg)
These are confidential sessions—please refrain from streaming, blogging, or taking pictures
Session 409
Testing in Xcode 5
Mike SwinglerXcode Engineer
![Page 2: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/2.jpg)
Why Test?
![Page 3: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/3.jpg)
Why Test?
• Catch crashes
![Page 4: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/4.jpg)
Why Test?
• Catch crashes• Catch logic errors
![Page 5: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/5.jpg)
Why Test?
• Catch crashes• Catch logic errors•Help you write your code
![Page 6: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/6.jpg)
Why Test?
• Catch crashes• Catch logic errors•Help you write your code• Catch regressions
![Page 7: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/7.jpg)
Why Test?
• Catch crashes• Catch logic errors•Help you write your code• Catch regressions• Cover more configurations
![Page 8: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/8.jpg)
Why Test?
• Catch crashes• Catch logic errors•Help you write your code• Catch regressions• Cover more configurations• Cover everyone, all the time
![Page 9: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/9.jpg)
Overview
![Page 10: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/10.jpg)
Overview
•What is a unit test?
![Page 11: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/11.jpg)
Overview
•What is a unit test?• Introducing XCTest
![Page 12: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/12.jpg)
Overview
•What is a unit test?• Introducing XCTest•Writing, running and debugging tests
![Page 13: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/13.jpg)
Overview
•What is a unit test?• Introducing XCTest•Writing, running and debugging tests• Continuous integration
![Page 14: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/14.jpg)
Overview
•What is a unit test?• Introducing XCTest•Writing, running and debugging tests• Continuous integration•Advanced setups
![Page 15: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/15.jpg)
Unit Testing
![Page 16: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/16.jpg)
• Tests ONE thing■ Single “unit” of functionality■ Pass/Fail■ Small, fast, isolated 1
What Is a Unit Test?
![Page 17: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/17.jpg)
• Tests ONE thing■ Single “unit” of functionality■ Pass/Fail■ Small, fast, isolated
•Unit tests don’t cover■ Performance 1
What is a Unit Test?
![Page 18: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/18.jpg)
• Tests ONE thing■ Single “unit” of functionality■ Pass/Fail■ Small, fast, isolated
•Unit tests don’t cover■ Performance■ UI interaction 1
What is a Unit Test?
![Page 19: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/19.jpg)
• Tests ONE thing■ Single “unit” of functionality■ Pass/Fail■ Small, fast, isolated
•Unit tests don’t cover■ Performance■ UI interaction■ Whole system integration 1
What is a Unit Test?
![Page 20: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/20.jpg)
Where to start testingYour App
![Page 21: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/21.jpg)
Where to start testingYour App
Model
Controller
View Server
Database
![Page 22: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/22.jpg)
Where to start testingYour App
Model
Controller
View Server
Database
![Page 23: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/23.jpg)
Introducing XCTest
![Page 24: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/24.jpg)
XCTest.framework
• iOS and OS X
![Page 25: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/25.jpg)
XCTest.framework
• iOS and OS X• Requires Xcode 5
![Page 26: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/26.jpg)
XCTest.framework
• iOS and OS X• Requires Xcode 5•Derived from OCUnit
■ Modernized■ Migration tool
![Page 27: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/27.jpg)
XCTest.framework
• iOS and OS X• Requires Xcode 5•Derived from OCUnit
■ Modernized■ Migration tool
• Builds .xctest bundles
![Page 28: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/28.jpg)
XCTest.framework
• iOS and OS X• Requires Xcode 5•Derived from OCUnit
■ Modernized■ Migration tool
• Builds .xctest bundles• Test runner injected in your app
![Page 29: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/29.jpg)
XCTest.framework
• iOS and OS X• Requires Xcode 5•Derived from OCUnit
■ Modernized■ Migration tool
• Builds .xctest bundles• Test runner injected in your app• Test rig loads libraries and test bundles
![Page 30: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/30.jpg)
Test Code
![Page 31: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/31.jpg)
@interface ExampleTests : XCTestCase@end
@implementation ExampleTests
- (void) testExample { XCTAssertTrue(2 + 2 == 4);}
@end
Test Code
![Page 32: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/32.jpg)
@interface ExampleTests : XCTestCase@end
@implementation ExampleTests
- (void) testExample { XCTAssertTrue(2 + 2 == 4);}
@end
Test Code
• Subclass XCTestCase XCTestCase
![Page 33: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/33.jpg)
@interface ExampleTests : XCTestCase@end
@implementation ExampleTests
- (void) testExample { XCTAssertTrue(2 + 2 == 4);}
@end
- (void) testExample {
}
Test Code
• Subclass XCTestCase• test = method
![Page 34: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/34.jpg)
@interface ExampleTests : XCTestCase@end
@implementation ExampleTests
- (void) testExample { XCTAssertTrue(2 + 2 == 4);}
@end
Test Code
• Subclass XCTestCase• test = method• Prefixed “test”
test
![Page 35: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/35.jpg)
@interface ExampleTests : XCTestCase@end
@implementation ExampleTests
- (void) testExample { XCTAssertTrue(2 + 2 == 4);}
@end
Test Code
• Subclass XCTestCase• test = method• Prefixed “test”•No arguments, returns void void
![Page 36: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/36.jpg)
@interface ExampleTests : XCTestCase@end
@implementation ExampleTests
- (void) testExample { XCTAssertTrue(2 + 2 == 4);}
@end
XCTAssertTrue(2 + 2 == 4)
Test Code
• Subclass XCTestCase• test = method• Prefixed “test”•No arguments, returns void•Makes assertions
![Page 37: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/37.jpg)
@interface ExampleTests : XCTestCase@end
@implementation ExampleTests
- (void) testExample { XCTAssertTrue(2 + 2 == 4);}
@end
Test Code
• Subclass XCTestCase• test = method• Prefixed “test”•No arguments, returns void•Makes assertions• Built into test target
![Page 38: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/38.jpg)
Test Navigator
![Page 39: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/39.jpg)
Test Navigator
![Page 40: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/40.jpg)
• Test bundle targets■ Test classes
■ Test methods
Test Navigator
![Page 41: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/41.jpg)
• Test bundle targets■ Test classes
■ Test methods
• Click to run
Test Navigator
![Page 42: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/42.jpg)
• Test bundle targets■ Test classes
■ Test methods
• Click to run
Test Navigator
![Page 43: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/43.jpg)
• Test bundle targets■ Test classes
■ Test methods
• Click to run
Test Navigator
![Page 44: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/44.jpg)
• Test bundle targets■ Test classes
■ Test methods
• Click to run• Results inline
Test Navigator
![Page 45: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/45.jpg)
• Test bundle targets■ Test classes
■ Test methods
• Click to run• Results inline
Test Navigator
![Page 46: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/46.jpg)
• Test bundle targets■ Test classes
■ Test methods
• Click to run• Results inline
Test Navigator
![Page 47: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/47.jpg)
• Test bundle targets■ Test classes
■ Test methods
• Click to run• Results inline
Test Navigator
![Page 48: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/48.jpg)
• Test bundle targets■ Test classes
■ Test methods
• Click to run• Results inline
Test Navigator
![Page 49: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/49.jpg)
• Test bundle targets■ Test classes
■ Test methods
• Click to run• Results inline• Filter failures
Test Navigator
![Page 50: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/50.jpg)
• Test bundle targets■ Test classes
■ Test methods
• Click to run• Results inline• Filter failures
Test Navigator
![Page 51: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/51.jpg)
Editor Test Indicators
![Page 52: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/52.jpg)
Editor Test Indicators
![Page 53: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/53.jpg)
Editor Test Indicators
![Page 54: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/54.jpg)
Editor Test Indicators
![Page 55: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/55.jpg)
DemoMaking your first unit test in Xcode 5
Mike SwinglerXcode Engineer
![Page 56: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/56.jpg)
• Creating a test target is easy•Add a new test by adding a method• Easy to run tests
■ Test navigator■ Editor
Making your first unit test in Xcode 5Overview
![Page 57: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/57.jpg)
• Creating a test target is easy•Add a new test by adding a method• Easy to run tests
■ Test navigator■ Editor
Making your first unit test in Xcode 5Overview
![Page 58: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/58.jpg)
• Creating a test target is easy•Add a new test by adding a method• Easy to run tests
■ Test navigator■ Editor
Making your first unit test in Xcode 5Overview
![Page 59: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/59.jpg)
• Creating a test target is easy•Add a new test by adding a method• Easy to run tests
■ Test navigator■ Editor
Making your first unit test in Xcode 5Overview
![Page 60: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/60.jpg)
• Creating a test target is easy•Add a new test by adding a method• Easy to run tests
■ Test navigator■ Editor
Making your first unit test in Xcode 5Overview
![Page 61: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/61.jpg)
• Creating a test target is easy•Add a new test by adding a method• Easy to run tests
■ Test navigator■ Editor
Making your first unit test in Xcode 5Overview
![Page 62: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/62.jpg)
XCTestAssertions.hAssert the Expected
![Page 63: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/63.jpg)
XCTestAssertions.hAssert the Expected
XCTFail
XCTAssertNil
XCTAssertNotNil
XCTAssertTrue
XCTAssertTrueNoThrow
XCTAssertFalse
XCTAssertFalseNoThrow
XCTAssertEqualObjects
XCTAssertEquals
XCTAssertEqualsWithAccuracy
XCTAssertThrows
XCTAssertThrowsSpecific
XCTAssertThrowsSpecificNamed
XCTAssertNoThrow
XCTAssertNoThrowSpecific
XCTAssertNoThrowSpecificNamed
![Page 64: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/64.jpg)
XCTestAssertions.hAssert the Expected
XCTFail
XCTAssertNil
XCTAssertNotNil
XCTAssertTrue
XCTAssertTrueNoThrow
XCTAssertFalse
XCTAssertFalseNoThrow
XCTAssertEqualObjects
XCTAssertEquals
XCTAssertEqualsWithAccuracy
XCTAssertThrows
XCTAssertThrowsSpecific
XCTAssertThrowsSpecificNamed
XCTAssertNoThrow
XCTAssertNoThrowSpecific
XCTAssertNoThrowSpecificNamed
![Page 65: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/65.jpg)
XCTestAssertions.hAssert the Expected
XCTFail
XCTAssertNil
XCTAssertNotNil
XCTAssertTrue
XCTAssertTrueNoThrow
XCTAssertFalse
XCTAssertFalseNoThrow
XCTAssertEqualObjects
XCTAssertEquals
XCTAssertEqualsWithAccuracy
XCTAssertThrows
XCTAssertThrowsSpecific
XCTAssertThrowsSpecificNamed
XCTAssertNoThrow
XCTAssertNoThrowSpecific
XCTAssertNoThrowSpecificNamed
![Page 66: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/66.jpg)
XCTestAssertions.hAssert the Expected
XCTFail
XCTAssertNil
XCTAssertNotNil
XCTAssertTrue
XCTAssertTrueNoThrow
XCTAssertFalse
XCTAssertFalseNoThrow
XCTAssertEqualObjects
XCTAssertEquals
XCTAssertEqualsWithAccuracy
XCTAssertThrows
XCTAssertThrowsSpecific
XCTAssertThrowsSpecificNamed
XCTAssertNoThrow
XCTAssertNoThrowSpecific
XCTAssertNoThrowSpecificNamed
![Page 67: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/67.jpg)
XCTestAssertions.hAssert the Expected
XCTFail
XCTAssertNil
XCTAssertNotNil
XCTAssertTrue
XCTAssertTrueNoThrow
XCTAssertFalse
XCTAssertFalseNoThrow
XCTAssertEqualObjects
XCTAssertEquals
XCTAssertEqualsWithAccuracy
XCTAssertThrows
XCTAssertThrowsSpecific
XCTAssertThrowsSpecificNamed
XCTAssertNoThrow
XCTAssertNoThrowSpecific
XCTAssertNoThrowSpecificNamed
![Page 68: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/68.jpg)
Expect the Unexpected
![Page 69: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/69.jpg)
Expect the Unexpected
• Expected success
![Page 70: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/70.jpg)
Expect the Unexpected
• Expected success■ Can come first
![Page 71: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/71.jpg)
• Expected success■ Can come first
• Regressions
Expect the Unexpected
![Page 72: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/72.jpg)
• Expected success■ Can come first
• Regressions• Expected failure
Expect the Unexpected
![Page 73: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/73.jpg)
• Expected success■ Can come first
• Regressions• Expected failure
■ Overflow, ∞, NaN
Expect the Unexpected
![Page 74: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/74.jpg)
• Expected success■ Can come first
• Regressions• Expected failure
■ Overflow, ∞, NaN■ Nil
Expect the Unexpected
![Page 75: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/75.jpg)
• Expected success■ Can come first
• Regressions• Expected failure
■ Overflow, ∞, NaN■ Nil■ Empty collections
Expect the Unexpected
![Page 76: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/76.jpg)
• Expected success■ Can come first
• Regressions• Expected failure
■ Overflow, ∞, NaN■ Nil■ Empty collections■ Unexpected types in collections
Expect the Unexpected
![Page 77: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/77.jpg)
• Expected success■ Can come first
• Regressions• Expected failure
■ Overflow, ∞, NaN■ Nil■ Empty collections■ Unexpected types in collections■ NSError
Expect the Unexpected
![Page 78: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/78.jpg)
-setUpSet Up a Test
![Page 79: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/79.jpg)
-setUpSet Up a Test
• Runs before every test method
![Page 80: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/80.jpg)
-setUpSet Up a Test
• Runs before every test method• Create “shim” objects
![Page 81: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/81.jpg)
-setUpSet Up a Test
• Runs before every test method• Create “shim” objects• Load data from .xctest bundle
■ [NSBundle bundleForClass:[MyTestClass class]]
![Page 82: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/82.jpg)
-setUpSet Up a Test
• Runs before every test method• Create “shim” objects• Load data from .xctest bundle
■ [NSBundle bundleForClass:[MyTestClass class]]
•…anything you need to setup “the world”
![Page 83: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/83.jpg)
-setUpSet Up a Test
• Runs before every test method• Create “shim” objects• Load data from .xctest bundle
■ [NSBundle bundleForClass:[MyTestClass class]]
•…anything you need to setup “the world” •Use -tearDown to perform any cleanup
![Page 84: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/84.jpg)
Test class and methods
@interface ExampleTests : XCTestCase@implementation ExampleTests
+ (void) setUp { /* Class set-up. */ }
+ (void) tearDown { /* Class tear-down. */ }
- (void) setUp { /* Test set-up. */ }
- (void) tearDown { /* Test tear-down. */ }
- (void) testExamplePassing { XCTAssertTrue(YES);}
- (void) testExampleFailing { XCTAssertTrue(NO);}
How XCTest Works
![Page 85: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/85.jpg)
Test class and methods
@interface ExampleTests : XCTestCase@implementation ExampleTests
+ (void) setUp { /* Class set-up. */ }
+ (void) tearDown { /* Class tear-down. */ }
- (void) setUp { /* Test set-up. */ }
- (void) tearDown { /* Test tear-down. */ }
- (void) testExamplePassing { XCTAssertTrue(YES);}
- (void) testExampleFailing { XCTAssertTrue(NO);}
How XCTest Works
XCTestCase
- (void) test
- (void) test
![Page 86: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/86.jpg)
Test class and methods
@interface ExampleTests : XCTestCase@implementation ExampleTests
+ (void) setUp { /* Class set-up. */ }
+ (void) tearDown { /* Class tear-down. */ }
- (void) setUp { /* Test set-up. */ }
- (void) tearDown { /* Test tear-down. */ }
- (void) testExamplePassing { XCTAssertTrue(YES);}
- (void) testExampleFailing { XCTAssertTrue(NO);}
How XCTest Works
![Page 87: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/87.jpg)
Test class and methods
@interface ExampleTests : XCTestCase@implementation ExampleTests
+ (void) setUp { /* Class set-up. */ }
+ (void) tearDown { /* Class tear-down. */ }
- (void) setUp { /* Test set-up. */ }
- (void) tearDown { /* Test tear-down. */ }
- (void) testExamplePassing { XCTAssertTrue(YES);}
- (void) testExampleFailing { XCTAssertTrue(NO);}
How XCTest Works
![Page 88: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/88.jpg)
Test class and methods
@interface ExampleTests : XCTestCase@implementation ExampleTests
+ (void) setUp { /* Class set-up. */ }
+ (void) tearDown { /* Class tear-down. */ }
- (void) setUp { /* Test set-up. */ }
- (void) tearDown { /* Test tear-down. */ }
- (void) testExamplePassing { XCTAssertTrue(YES);}
- (void) testExampleFailing { XCTAssertTrue(NO);}
How XCTest Works
![Page 89: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/89.jpg)
Test class and methods
@interface ExampleTests : XCTestCase@implementation ExampleTests
+ (void) setUp { /* Class set-up. */ }
+ (void) tearDown { /* Class tear-down. */ }
- (void) setUp { /* Test set-up. */ }
- (void) tearDown { /* Test tear-down. */ }
- (void) testExamplePassing { XCTAssertTrue(YES);}
- (void) testExampleFailing { XCTAssertTrue(NO);}
How XCTest Works
![Page 90: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/90.jpg)
Test class and methods
@interface ExampleTests : XCTestCase@implementation ExampleTests
+ (void) setUp { /* Class set-up. */ }
+ (void) tearDown { /* Class tear-down. */ }
- (void) setUp { /* Test set-up. */ }
- (void) tearDown { /* Test tear-down. */ }
- (void) testExamplePassing { XCTAssertTrue(YES);}
- (void) testExampleFailing { XCTAssertTrue(NO);}
How XCTest Works
![Page 91: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/91.jpg)
Test class and methods
@interface ExampleTests : XCTestCase@implementation ExampleTests
+ (void) setUp { /* Class set-up. */ }
+ (void) tearDown { /* Class tear-down. */ }
- (void) setUp { /* Test set-up. */ }
- (void) tearDown { /* Test tear-down. */ }
- (void) testExamplePassing { XCTAssertTrue(YES);}
- (void) testExampleFailing { XCTAssertTrue(NO);}
How XCTest Works
![Page 92: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/92.jpg)
Test class and methods
@interface ExampleTests : XCTestCase@implementation ExampleTests
+ (void) setUp { /* Class set-up. */ }
+ (void) tearDown { /* Class tear-down. */ }
- (void) setUp { /* Test set-up. */ }
- (void) tearDown { /* Test tear-down. */ }
- (void) testExamplePassing { XCTAssertTrue(YES);}
- (void) testExampleFailing { XCTAssertTrue(NO);}
How XCTest Works
![Page 93: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/93.jpg)
Test class and methods
@interface ExampleTests : XCTestCase@implementation ExampleTests
+ (void) setUp { /* Class set-up. */ }
+ (void) tearDown { /* Class tear-down. */ }
- (void) setUp { /* Test set-up. */ }
- (void) tearDown { /* Test tear-down. */ }
- (void) testExamplePassing { XCTAssertTrue(YES);}
- (void) testExampleFailing { XCTAssertTrue(NO);}
How XCTest Works
![Page 94: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/94.jpg)
Test class and methods
@interface ExampleTests : XCTestCase@implementation ExampleTests
+ (void) setUp { /* Class set-up. */ }
+ (void) tearDown { /* Class tear-down. */ }
- (void) setUp { /* Test set-up. */ }
- (void) tearDown { /* Test tear-down. */ }
- (void) testExamplePassing { XCTAssertTrue(YES);}
- (void) testExampleFailing { XCTAssertTrue(NO);}
How XCTest Works
![Page 95: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/95.jpg)
OCUnit
![Page 96: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/96.jpg)
• Co-exists with XCTest
OCUnit
![Page 97: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/97.jpg)
• Co-exists with XCTest• You may still need it
■ iOS 6
OCUnit
![Page 98: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/98.jpg)
• Co-exists with XCTest• You may still need it
■ iOS 6
•Migration tool available
OCUnit
![Page 99: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/99.jpg)
• Co-exists with XCTest• You may still need it
■ iOS 6
•Migration tool available
OCUnit
![Page 100: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/100.jpg)
• Co-exists with XCTest• You may still need it
■ iOS 6
•Migration tool available
OCUnit
![Page 101: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/101.jpg)
• Co-exists with XCTest• You may still need it
■ iOS 6
•Migration tool available
OCUnit
![Page 102: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/102.jpg)
Debugging Tests
![Page 103: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/103.jpg)
DemoDebugging tests
Bino George Xcode Engineer
![Page 104: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/104.jpg)
New test debugging UI
• Test breakpoint
Overview
![Page 105: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/105.jpg)
New test debugging UI
• Test breakpoint
Overview
![Page 106: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/106.jpg)
New test debugging UI
• Test breakpoint• Test assistant categories
Overview
![Page 107: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/107.jpg)
New test debugging UI
• Test breakpoint• Test assistant categories
Overview
![Page 108: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/108.jpg)
New test debugging UIOverview
• Test breakpoint• Test assistant categories• Test Again command
![Page 109: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/109.jpg)
New test debugging UIOverview
• Test breakpoint• Test assistant categories• Test Again command
![Page 110: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/110.jpg)
New test debugging UIOverview
• Test breakpoint• Test assistant categories• Test Again command
![Page 111: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/111.jpg)
New test debugging UIOverview
• Test breakpoint• Test assistant categories• Test Again command
![Page 112: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/112.jpg)
Continuous Integration and Testing
![Page 113: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/113.jpg)
Testing Using OS X Server
![Page 114: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/114.jpg)
Testing Using OS X Server
• Xcode service Bots perform integrations■ Every time your commit code■ On the hour
![Page 115: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/115.jpg)
Testing Using OS X Server
• Xcode service bots perform integrations■ Every time your commit code■ On the hour
• Create a Scheme■ Bots run shared schemes
![Page 116: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/116.jpg)
SHARED
Testing Using OS X Server
• Xcode service bots perform integrations■ Every time your commit code■ On the hour
• Create a Scheme■ Bots run shared schemes
![Page 117: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/117.jpg)
Testing Using OS X Server
• Xcode service bots perform integrations■ Every time your commit code■ On the hour
• Create a Scheme■ Bots run shared schemes
• Brings results to you
![Page 118: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/118.jpg)
Many Configurations
![Page 119: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/119.jpg)
• iOS devices
Many Configurations
![Page 120: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/120.jpg)
• iOS devices• iOS simulator
Many Configurations
![Page 121: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/121.jpg)
• iOS devices• iOS simulator•Different OS versions
Many Configurations
![Page 122: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/122.jpg)
• iOS devices• iOS simulator•Different OS versions•OS X
Many Configurations
![Page 123: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/123.jpg)
DemoContinuous integration with OS X Server
![Page 124: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/124.jpg)
Continuous integration with OS X ServerOverview
![Page 125: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/125.jpg)
Continuous integration with OS X ServerOverview
• Setup shared schemes for bot
![Page 126: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/126.jpg)
Continuous integration with OS X ServerOverview
• Setup shared schemes for bot• Covers multiple configurations
■ Devices, OS versions, simulators
![Page 127: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/127.jpg)
Continuous integration with OS X ServerOverview
• Setup shared schemes for bot• Covers multiple configurations
■ Devices, OS versions, simulators
• Bot and test results summary
![Page 128: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/128.jpg)
Command-line Testing
![Page 129: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/129.jpg)
Command-line Testing
> xcodebuild test
![Page 130: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/130.jpg)
Command-line Testing
> xcodebuild test-scheme MyLibrary
![Page 131: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/131.jpg)
Command-line Testing
> xcodebuild test-scheme MyLibrary-destination 'platform=OS X,arch=x86_64'
![Page 132: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/132.jpg)
Command-line Testing
> xcodebuild test-scheme MyLibrary-destination 'platform=OS X,arch=x86_64'-destination 'platform=iOS,name=My Development iPod Touch’
![Page 133: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/133.jpg)
'
Command-line Testing
> xcodebuild test-scheme MyLibrary-destination 'platform=OS X,arch=x86_64'-destination 'platform=iOS,name=My Development iPod Touch’-destination 'platform=iOS Simulator,name=iPhone
![Page 134: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/134.jpg)
Command-line Testing
> xcodebuild test-scheme MyLibrary-destination 'platform=OS X,arch=x86_64'-destination 'platform=iOS,name=My Development iPod Touch’-destination 'platform=iOS Simulator,name=iPhone,OS=6.1'
![Page 135: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/135.jpg)
Wrap Up
![Page 136: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/136.jpg)
Wrap Up
•What is a unit test?
![Page 137: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/137.jpg)
Wrap Up
•What is a unit test?• Introducing XCTest
![Page 138: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/138.jpg)
Wrap Up
•What is a unit test?• Introducing XCTest•Writing, running and debugging tests
![Page 139: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/139.jpg)
Wrap Up
•What is a unit test?• Introducing XCTest•Writing, running and debugging tests
■ Test Navigator
![Page 140: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/140.jpg)
Wrap Up
•What is a unit test?• Introducing XCTest•Writing, running and debugging tests
■ Test Navigator■ Editor indicators
![Page 141: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/141.jpg)
Wrap Up
•What is a unit test?• Introducing XCTest•Writing, running and debugging tests
■ Test Navigator■ Editor indicators■ Test failure breakpoint
![Page 142: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/142.jpg)
Wrap Up
•What is a unit test?• Introducing XCTest•Writing, running and debugging tests
■ Test Navigator■ Editor indicators■ Test failure breakpoint■ Assistant categories
![Page 143: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/143.jpg)
Wrap Up
•What is a unit test?• Introducing XCTest•Writing, running and debugging tests
■ Test Navigator■ Editor indicators■ Test failure breakpoint■ Assistant categories■ Test Again command
![Page 144: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/144.jpg)
Wrap Up
•What is a unit test?• Introducing XCTest•Writing, running and debugging tests
■ Test Navigator■ Editor indicators■ Test failure breakpoint■ Assistant categories■ Test Again command
• Continuous integration, advanced setups
![Page 145: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/145.jpg)
Wrap Up
•What is a unit test?• Introducing XCTest•Writing, running and debugging tests
■ Test Navigator■ Editor indicators■ Test failure breakpoint■ Assistant categories■ Test Again command
• Continuous integration, advanced setups• Testing helps you write better, high quality apps
![Page 146: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/146.jpg)
More Information
Dave DeLongDeveloper Tools [email protected]
Xcode Documentationhttp://developer.apple.com/
Apple Developer Forumshttp://devforums.apple.com
![Page 147: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/147.jpg)
Related Sessions
Continuous Integration with Xcode 5 PresidioTuesday 3:15PM
![Page 148: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/148.jpg)
Related Labs
ç
Tools Lab Tools LabOngoing
Xcode and Continuous Integration Lab Tools Lab AThursday 9:00AM
![Page 149: Testing in Xcode 5 - Apple Inc.devstreaming.apple.com/videos/wwdc/2013/409xdx4x4adcwca5ok0rts… · These are confidential sessions—please refrain from streaming, blogging, or taking](https://reader034.vdocuments.net/reader034/viewer/2022042605/5a78b8ae7f8b9ae91b8e830a/html5/thumbnails/149.jpg)