Automated Testing with GHUnit and KIF

download Automated Testing with GHUnit and KIF

of 60

  • date post

    08-May-2015
  • Category

    Technology

  • view

    14.296
  • download

    4

Embed Size (px)

description

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.

Transcript of Automated Testing with GHUnit and KIF

  • 1.Automated Testingwith GHUnit and KIF Michele TitoloSr. Mobile Engineer / Prolific Interactive@micheletitolo

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