Successfully reported this slideshow.

Automated Testing with GHUnit and KIF

5

Share

Loading in …3
×
1 of 60
1 of 60

Automated Testing with GHUnit and KIF

5

Share

Download to read offline

This talk will explain how we can all write better code; one of the easiest ways to do this is through testing. We'll cover two popular open source frameworks, GHUnit and KIF, both of which can be automated with a CI like Jenkins.

This talk will explain how we can all write better code; one of the easiest ways to do this is through testing. We'll cover two popular open source frameworks, GHUnit and KIF, both of which can be automated with a CI like Jenkins.

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

Automated Testing with GHUnit and KIF

  1. 1. Automated Testing with GHUnit and KIF Michele Titolo Sr. Mobile Engineer / Prolific Interactive @micheletitolo
  2. 2. Why test your code?
  3. 3. Types of Frameworks
  4. 4. Types of Frameworks
  5. 5. Types of Frameworks • Unit Testing
  6. 6. Types of Frameworks • Unit Testing • UI Testing
  7. 7. Choosing Frameworks
  8. 8. Unit
  9. 9. Unit
  10. 10. Unit • OCUnit/SenTestKit
  11. 11. Unit • OCUnit/SenTestKit • GHUnit
  12. 12. UI
  13. 13. UI
  14. 14. UI • UIAutomation
  15. 15. UI • UIAutomation • Frank
  16. 16. UI • UIAutomation • Frank • KIF
  17. 17. GHUnit
  18. 18. Demo
  19. 19. Setup
  20. 20. GHUnit has it’s own target
  21. 21. GHTestCase
  22. 22. Automation
  23. 23. Apple keeps breaking testing from CLI
  24. 24. JUnit test results
  25. 25. Gotchas
  26. 26. Vertical slices of functionality
  27. 27. Apple breaks things
  28. 28. UI Testing is difficult
  29. 29. KIF
  30. 30. Demo
  31. 31. Setup
  32. 32. KIF has it’s own target
  33. 33. KIFTestController
  34. 34. KIFTestScenario & KIFTestStep
  35. 35. Automation
  36. 36. ios-sim https://github.com/phonegap/ios-sim
  37. 37. /usr/local/bin/ios-sim launch $APPFILE --family ipad > ! ! /tmp/KIF-ipad-$$.out 2>&1
  38. 38. Test Output
  39. 39. cp "`grep "JUNIT XML RESULTS AT " /tmp/KIF-ipad-$$.out | sed 's/.*JUNIT XML RESULTS AT //'`" 'test-reports/KIF-ipad- results.xml'
  40. 40. Gotchas
  41. 41. [scenario addStep:[KIFTestStep stepToWaitForTimeInterval:1 ! description:@"wait"]]; [scenario addStep:[KIFTestStep ! ! stepToWaitForViewWithAccessibilityLabel:@"Table"]];
  42. 42. [KIFTestScenario setDefaultStepsToSetUp:[KIFTestStep ! setupSteps]];
  43. 43. [scenario addStepsFromArray:[LoginTestStep ! stepsToLoginWithEmail:TEST_EMAIL ! password:TEST_PASSWORD]];
  44. 44. [scenario addStep:[KIFTestStep !! ! ! ! ! ! ! ! stepToScrollToItemWithAccessibilityLabel:@"Settings"]];
  45. 45. In Summary
  46. 46. Do tests help you write better code?
  47. 47. Do tests help you write better code? Yes.
  48. 48. Do writing tests add to dev time?
  49. 49. Do writing tests add to dev time? Yes.
  50. 50. Is testing worth the extra time?
  51. 51. Is testing worth the extra time? Absolutely.
  52. 52. The End https://github.com/mtitolo/UICatalog-Tests Michele Titolo @micheletitolo

×