Automated interactive testing for i os
-
Upload
mobile-march -
Category
Technology
-
view
826 -
download
2
description
Transcript of Automated interactive testing for i os
![Page 1: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/1.jpg)
Automated Interactive Testing for iOSRob Bajorek - Code 42 Software
![Page 2: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/2.jpg)
Topics
• Interactive testing
• The tools
• Demo and walkthrough
![Page 3: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/3.jpg)
Interactive Testing
![Page 4: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/4.jpg)
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](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/5.jpg)
Unit tests can pay for themselves over time
![Page 6: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/6.jpg)
Unit tests are easy to automate
![Page 7: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/7.jpg)
Continuous Integration
![Page 8: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/8.jpg)
What’s missing?
![Page 9: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/9.jpg)
Interactive testing is...
• time-consuming
• boring
• error-prone
![Page 10: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/10.jpg)
Automate your interactive testing
![Page 11: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/11.jpg)
You still need people
![Page 12: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/12.jpg)
The Tools
• UI Automation
• CoffeeScript
• Accessibility
• Zucchini
![Page 13: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/13.jpg)
UI Automation
• UI Automation Reference Collection
![Page 15: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/15.jpg)
Accessibility
• Accessibility Programming Guide for iOS
![Page 16: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/16.jpg)
Zucchini
• http://www.zucchiniframework.org
![Page 17: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/17.jpg)
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](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/18.jpg)
Demo
• Brief install advice
• Project setup
• Example “smoke test”
• Walkthrough
![Page 19: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/19.jpg)
Prerequisites
• See instructions at www.zucchiniframework.org
• Homebrew / MacPorts
• ImageMagick
• CoffeeScript
![Page 20: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/20.jpg)
Installing Zucchini
• https://github.com/playup/zucchini
• https://github.com/rajbeniwal/zucchini-demo
![Page 21: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/21.jpg)
Demo and Walkthrough
![Page 22: Automated interactive testing for i os](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/22.jpg)
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](https://reader033.fdocuments.us/reader033/viewer/2022042715/55820847d8b42aa9498b4fd5/html5/thumbnails/23.jpg)
Thank you!