iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deployment for iOS

  • 9,389 views
Uploaded on

Great testing and deployment tools already exist for web platforms like Rails; now it is iOS' turn! What's out there, where can you get it, how do you use it ... and where do we go from here?

Great testing and deployment tools already exist for web platforms like Rails; now it is iOS' turn! What's out there, where can you get it, how do you use it ... and where do we go from here?

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
9,389
On Slideshare
0
From Embeds
0
Number of Embeds
3

Actions

Shares
Downloads
36
Comments
0
Likes
4

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Transcript

  • 1. Getting “Test”-yTest-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? OCHamcrestSenTestingKit Cedar KIF GTM Kiwi 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.
  • 9. Why do we test FIRST? To design our code. (duh!)
  • 10. Why do we test FIRST?
  • 11. Test Structure
  • 12. Test StructureGIVEN
  • 13. Test StructureGIVENWHEN
  • 14. Test StructureGIVENWHENTHEN
  • 15. Test StructureGIVEN certain conditionsWHENTHEN
  • 16. Test StructureGIVEN certain conditionsWHEN something happensTHEN
  • 17. Test StructureGIVEN certain conditionsWHEN something happensTHEN the conditions change (or don’t)
  • 18. Unit Testing
  • 19. Unit Testing
  • 20. Sample Class
  • 21. xUnit Style
  • 22. SenTestingKit
  • 23. OCHamcresthttp://bit.ly/ochamcrest
  • 24. Stubbing & Mocking
  • 25. OCMockhttp://bit.ly/qktX3H
  • 26. GTMhttp://bit.ly/gtmtest
  • 27. GHUnithttp://gabriel.github.com/gh-unit/
  • 28. BDD
  • 29. BDDBehaviorDrivenDesign
  • 30. RSpechttp://github.com/rspec/rspec
  • 31. RSpec Book
  • 32. Cedarhttp://github.com/pivotal/cedar
  • 33. Kiwihttp://kiwi-lib.info/
  • 34. Integration Tests
  • 35. Cucumberhttp://cukes.info/
  • 36. iCukehttp://github.com/unboxed/icuke
  • 37. iCukehttp://github.com/unboxed/icuke
  • 38. Frankhttp://github.com/moredip/Frank
  • 39. KIFhttp://github.com/square/KIF
  • 40. KIF Keep It Functionalhttp://github.com/square/KIF
  • 41. KIFhttp://github.com/square/KIF
  • 42. Continuous Integration
  • 43. Command-Line Builds
  • 44. Command-Line Execution
  • 45. ➜ ~ ./build.sh Bash...**** Describe WorkspaceAvailable schemesInformation about workspace "My_App":    Schemes:        Ad Hoc        Development**** Set EnvironmentMy_App/My_App/staging-Info.plist -> ~/TeamCity/build-agent-1/work/My_App_staging/My_App/My_App/My_App-Info.plistMy_App/My_App/staging.plist -> My_App/My_App/environment.plistEnvironment set to com.MyCompany.My_App.staging at version 1.0**** Increment Bundle VersionSetting version of project My_App to:    24....**** BuildRunning xcodebuild > xcodebuild_output ......Retrieving build products......**** Package ApplicationCodesign 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 DistributionGenerating com.MyCompany.My_App.staging.app.plist**** Complete! http://gist.github.com/949831
  • 46. Rakehttp://gist.github.com/1017153
  • 47. Over The AirDistribution
  • 48. 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
  • 49. OTA: TestFlight http://testflightapp.com/
  • 50. What’s Missing?
  • 51. Factories
  • 52. Factories
  • 53. Fixtures
  • 54. CoreData Migrations
  • 55. Auto-testing guard integrationhttps://github.com/guard/guard