1 / 48

Getting “Test”-y

Learn about test-driven development and automated deployment techniques for iOS development. Discover tools like OCHamcrest, Cedar, KIF, Kiwi, GTM, OCMock, Frank, GHUnit, and iCuke.

dudleye
Download Presentation

Getting “Test”-y

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Getting “Test”-y • Test-driven Development & Automated Deployment for iOS

  2. Your Humble Speakers • Jonah Williams - @Zalambar • Rudy Jahchan - @rudy

  3. How do we test?

  4. How do we test? OCHamcrest Cedar SenTestingKit KIF Kiwi GTM OCMock Frank GHUnit iCuke

  5. Why do we test?

  6. Why do we test? To make sure our code works (duh!)

  7. Why do we test FIRST?

  8. Why do we test FIRST? To design our code. (duh!)

  9. Why do we test FIRST?

  10. Test Structure GIVEN certain conditions WHEN something happens THEN the conditions change (or don’t)

  11. Unit Testing

  12. Unit Testing

  13. Sample Class

  14. xUnit Style

  15. SenTestingKit

  16. OCHamcrest http://bit.ly/ochamcrest

  17. Stubbing & Mocking

  18. OCMock http://bit.ly/qktX3H

  19. GTM http://bit.ly/gtmtest

  20. GHUnit http://gabriel.github.com/gh-unit/

  21. BDD

  22. BDD Behavior Driven Design

  23. RSpec http://github.com/rspec/rspec

  24. RSpec Book

  25. Cedar http://github.com/pivotal/cedar

  26. Kiwi http://kiwi-lib.info/

  27. Integration Tests

  28. Cucumber http://cukes.info/

  29. iCuke http://github.com/unboxed/icuke

  30. iCuke http://github.com/unboxed/icuke

  31. Frank http://github.com/moredip/Frank

  32. KIF http://github.com/square/KIF

  33. KIF Keep It Functional http://github.com/square/KIF

  34. KIF http://github.com/square/KIF

  35. Continuous Integration

  36. Command-Line Builds

  37. Command-Line Execution

  38. Bash ➜ ~ ./build.sh ... **** Describe Workspace Available schemes Information about workspace "My_App":     Schemes:         Ad Hoc         Development **** Set Environment My_App/My_App/staging-Info.plist -> ~/TeamCity/build-agent-1/work/My_App_staging/My_App/My_App/My_App-Info.plist My_App/My_App/staging.plist -> My_App/My_App/environment.plist Environment set to com.MyCompany.My_App.staging at version 1.0 **** Increment Bundle Version Setting version of project My_App to:     24. ... **** Build Running xcodebuild > xcodebuild_output ... ... Retrieving build products... ... **** Package Application Codesign as "iPhone Distribution: MyCompany, LLC", embedding provisioning profile ~/TeamCity/build-agent-1/work/My_App_staging/ad_hoc/My_App_Staging_Ad_Hoc.mobileprovision **** Verify ... **** Prepare OTA Distribution Generating com.MyCompany.My_App.staging.app.plist **** Complete! http://gist.github.com/949831

  39. Rake http://gist.github.com/1017153

  40. Over The Air Distribution

  41. OTA: Roll Your Own <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>items</key> <array> <dict> <key>assets</key> <array> <dict> <key>kind</key><string>software-package</string> <key>url</key><string>$artifacts_url/$project_app.ipa</string> </dict> <dict> <key>kind</key><string>full-size-image</string> <key>needs-shine</key><true/> <key>url</key><string>$artifacts_url/$full_size_image_name</string> </dict> <dict> <key>kind</key><string>display-image</string> <key>needs-shine</key><true/> <key>url</key><string>$artifacts_url/$display_image_name</string> </dict> </array> <key>metadata</key> <dict> <key>bundle-identifier</key> <string>$bundle_identifier</string> <key>bundle-version</key><string>$short_version_string $build_number</string> <key>kind</key><string>software</string> <key>subtitle</key><string>$environment_name</string> <key>title</key><string>$project_app</string> </dict> </dict> </array> </dict> </plist> itms-services://?action=download-manifest&url=http://host.example/project_name.acceptance.app.plist

  42. OTA: TestFlight http://testflightapp.com/

  43. What’s Missing?

  44. Factories

  45. Factories

  46. Fixtures

  47. CoreData Migrations

  48. Auto-testing guard integration https://github.com/guard/guard

More Related