automated interactive testing for i os

23
Automated Interactive Testing for iOS Rob Bajorek - Code 42 Software [email protected]

Upload: mobile-march

Post on 18-Jun-2015

826 views

Category:

Technology


2 download

DESCRIPTION

Mobile March 2012

TRANSCRIPT

Page 1: Automated interactive testing for i os

Automated Interactive Testing for iOSRob Bajorek - Code 42 Software

[email protected]

Page 2: Automated interactive testing for i os

Topics

• Interactive testing

• The tools

• Demo and walkthrough

Page 3: Automated interactive testing for i os

Interactive Testing

Page 4: Automated interactive testing for i os

Unit tests- (void)testClearNonPersistentCredentialsDoesNotClearPrivatePasswordPersistent {

[self helper_setTestCredentialsPersistent:YES]; [self helper_setUpAccountTypePrivatePasswordPersistent:YES]; CPConfigService *cs = [[CPConfigService alloc] init]; [cs clearNonPersistentCredentials]; GHAssertEqualStrings(cs.dataPassword, testDataPassword, @"private password incorrectly cleared (%@)", cs.dataPassword);}

- (void)testClearNonPersistentCredentialsClearsPrivatePasswordNonPersistent { [self helper_setTestCredentialsPersistent:YES]; [self helper_setUpAccountTypePrivatePasswordPersistent:NO]; CPConfigService *cs = [[CPConfigService alloc] init]; [cs clearNonPersistentCredentials]; GHAssertNil(cs.dataPassword, @"private password not cleared (%@)", cs.dataPassword);}

Page 5: Automated interactive testing for i os

Unit tests can pay for themselves over time

Page 6: Automated interactive testing for i os

Unit tests are easy to automate

Page 7: Automated interactive testing for i os

Continuous Integration

Page 8: Automated interactive testing for i os

What’s missing?

Page 9: Automated interactive testing for i os

Interactive testing is...

• time-consuming

• boring

• error-prone

Page 10: Automated interactive testing for i os

Automate your interactive testing

Page 11: Automated interactive testing for i os

You still need people

Page 12: Automated interactive testing for i os

The Tools

• UI Automation

• CoffeeScript

• Accessibility

• Zucchini

Page 13: Automated interactive testing for i os

UI Automation

• UI Automation Reference Collection

Page 14: Automated interactive testing for i os

CoffeeScript

• http://coffeescript.org

Page 15: Automated interactive testing for i os

Accessibility

• Accessibility Programming Guide for iOS

Page 16: Automated interactive testing for i os

Zucchini

• http://www.zucchiniframework.org

Page 17: Automated interactive testing for i os

Natural languagescript

Then on the "Browse" screen:

Download file "Minneapolis.jpg"

Tap cell "Minneapolis.jpg" in the table

Then on the "Viewer" screen:

Verify navigation bar title is "Minneapolis.jpg"

Tap "Back"

Then on the "Browse" screen:

Tap "Home"

Then on the "Home" screen:

Tap "Sign Out"

Page 18: Automated interactive testing for i os

Demo

• Brief install advice

• Project setup

• Example “smoke test”

• Walkthrough

Page 19: Automated interactive testing for i os

Prerequisites

• See instructions at www.zucchiniframework.org

• Homebrew / MacPorts

• ImageMagick

• CoffeeScript

Page 20: Automated interactive testing for i os

Installing Zucchini

• https://github.com/playup/zucchini

• https://github.com/rajbeniwal/zucchini-demo

Page 21: Automated interactive testing for i os

Demo and Walkthrough

Page 22: Automated interactive testing for i os

Conclusion

• Start at www.zucchiniframework.org

• Use the UI Automation Reference for help

• Get to know UIAElement

• ‘Show all elements’: -> view.logElementTree()

Page 23: Automated interactive testing for i os

Thank you!