Upgrade to Pro — share decks privately, control downloads, hide ads and more …

UI Testing with Frank

UI Testing with Frank

E14f55d3f939977cecbf51b64ff6f861?s=128

Keith Pitt

March 24, 2011
Tweet

Transcript

  1. UI Testing With Frank BDD Style Acceptance Testing with Frank

    and Cucumber
  2. @keithpitt Keith Pitt iOS/Web Developer The Frontier Group

  3. UI Testing Approaches • Testing the application yourself using the

    simulator or your device • Getting others to test the application using their own devices • Automated testing
  4. What tools are there? • Sikuli (image analysis) • Fonemonkey

    (record and playback) • UISpec (tests are written in Objective C) • iCuke (project not being developed)
  5. Frankenstein

  6. Frank • A bridge between Cucumber and UISpec • A

    “Frank Driver” that sends HTTP requests from Cucumber to a “Frank Server” that is installed in the Application • The “Frank Server” executes UISpec queries against the application, returns the result
  7. UISpec • UISpec is a Behaviour Driven Development framework for

    the iPhone that provides a full automated testing solution that drives the actual iPhone UI. • It is modelled after the very popular RSpec for Ruby. • Written in Objective C
  8. -(void)itShouldHaveDefaultUsers { //Check that all default users are in list

    [[app.tableView.label text:@"Larry Stooge"] should].exist; [[app.tableView.label text:@"Curly Stooge"] should].exist; [[app.tableView.label text:@"Moe Stooge"] should].exist; }
  9. Cucumber • Cucumber is a tool that executes plain-text functional

    descriptions as automated tests. • Written in Ruby • Created originally for use with Ruby on Rails. • Command line tool • Written specifically for BDD
  10. Feature: Search courses In order to ensure better utilization of

    courses Potential students should be able to search for courses Scenario: Search by topic Given there are 240 courses which do not have the topic "biology" And there are 2 courses A001, B205 that each have "biology" as one of the topics When I search for "biology" Then I should see the following courses: | Course code | | A001 | | B205 |
  11. None
  12. Demo

  13. Resources • https://github.com/moredip/Frank • https://github.com/aslakhellesoy/cucumber • http://www.melbournecocoaheads.com/ testing-ios-apps-with-frank-slides-and- videos/

  14. @keithpitt Thanks for your attention