Slide 1

Slide 1 text

UI Testing With Frank BDD Style Acceptance Testing with Frank and Cucumber

Slide 2

Slide 2 text

@keithpitt Keith Pitt iOS/Web Developer The Frontier Group

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

What tools are there? • Sikuli (image analysis) • Fonemonkey (record and playback) • UISpec (tests are written in Objective C) • iCuke (project not being developed)

Slide 5

Slide 5 text

Frankenstein

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

-(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; }

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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 |

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

Demo

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

@keithpitt Thanks for your attention