ios testing with frank

53
Friday, 18 February 2011

Upload: sean-woodhouse

Post on 08-May-2015

6.792 views

Category:

Documents


0 download

DESCRIPTION

Stewart Gleadow of Thoughtworks presents Frank at the February Melbourne Cocoaheads meetup. Frank is an automated iOS User Interface Testing tool.http://www.melbournecocoaheads.com/

TRANSCRIPT

Page 1: iOS Testing with Frank

Friday, 18 February 2011

Page 2: iOS Testing with Frank

TestingiOS apps

with Frank

Stewart Gleadow

Friday, 18 February 2011

Page 3: iOS Testing with Frank

why have tests?

Friday, 18 February 2011

Page 4: iOS Testing with Frank

why have tests?

Friday, 18 February 2011

Page 5: iOS Testing with Frank

Testing Approaches

Friday, 18 February 2011

Page 6: iOS Testing with Frank

Friday, 18 February 2011

Page 7: iOS Testing with Frank

“It seems to be working”

Friday, 18 February 2011

Page 8: iOS Testing with Frank

“Nothing is obviously broken”

Friday, 18 February 2011

Page 9: iOS Testing with Frank

Testing iPhone Apps

iPhone App

Friday, 18 February 2011

Page 10: iOS Testing with Frank

iPhone App

Server

Friday, 18 February 2011

Page 11: iOS Testing with Frank

iPhone App

ServerDone

Friday, 18 February 2011

Page 12: iOS Testing with Frank

Does MVC help?

Friday, 18 February 2011

Page 13: iOS Testing with Frank

UIView

UIViewController

Model

ServerFriday, 18 February 2011

Page 14: iOS Testing with Frank

UIView

UIViewController

Model

ServerFriday, 18 February 2011

Page 15: iOS Testing with Frank

UIView

UIViewController

Model

ServerFriday, 18 February 2011

Page 16: iOS Testing with Frank

UIView

UIViewController

Model

Server

Done

Friday, 18 February 2011

Page 17: iOS Testing with Frank

UIViewUIViewController

Friday, 18 February 2011

Page 18: iOS Testing with Frank

UIViewUIViewController

50% of iPhone code?

Friday, 18 February 2011

Page 19: iOS Testing with Frank

Potential Testing Tools

hmmm...

Friday, 18 February 2011

Page 20: iOS Testing with Frank

Potential Testing Tools

• Frank and UISpec hmmm...

Friday, 18 February 2011

Page 21: iOS Testing with Frank

Potential Testing Tools

• Frank and UISpec

• Sikuli

hmmm...

Friday, 18 February 2011

Page 22: iOS Testing with Frank

Potential Testing Tools

• Frank and UISpec

• Sikuli

• FoneMonkey

hmmm...

Friday, 18 February 2011

Page 23: iOS Testing with Frank

Potential Testing Tools

• Frank and UISpec

• Sikuli

• FoneMonkey

• Brominet or iCuke

hmmm...

Friday, 18 February 2011

Page 24: iOS Testing with Frank

Potential Testing Tools

• Frank and UISpec

• Sikuli

• FoneMonkey

• Brominet or iCuke

• UIAutomation

hmmm...

Friday, 18 February 2011

Page 25: iOS Testing with Frank

UISpec

Friday, 18 February 2011

Page 26: iOS Testing with Frank

UISpec

- (void)itShouldHaveDefaultUsers;{ [[app.tableView.label text:@"User"] should].exist;}

Friday, 18 February 2011

Page 27: iOS Testing with Frank

UISpec

Friday, 18 February 2011

Page 28: iOS Testing with Frank

Cucumber

Friday, 18 February 2011

Page 29: iOS Testing with Frank

Cucumber

Friday, 18 February 2011

Page 30: iOS Testing with Frank

Scenario: [name of the scenario]

Cucumber

Friday, 18 February 2011

Page 31: iOS Testing with Frank

Scenario: [name of the scenario]

Given [some statement]

Cucumber

Friday, 18 February 2011

Page 32: iOS Testing with Frank

Scenario: [name of the scenario]

Given [some statement]

When [some action]

Cucumber

Friday, 18 February 2011

Page 33: iOS Testing with Frank

Scenario: [name of the scenario]

Given [some statement]

When [some action]

Then [some expected result]

Cucumber

Friday, 18 February 2011

Page 34: iOS Testing with Frank

Scenario: [name of the scenario]

Given [some statement]

When [some action]

Then [some expected result]

And [another expectation]

Cucumber

Friday, 18 February 2011

Page 35: iOS Testing with Frank

to be perfectly Frank...

Friday, 18 February 2011

Page 36: iOS Testing with Frank

Tests

iPhoneApp

Friday, 18 February 2011

Page 37: iOS Testing with Frank

Tests

iPhoneApp

UISpecCucumber / Ruby

?

Friday, 18 February 2011

Page 38: iOS Testing with Frank

FrankServerTests

iPhoneApp

UISpecCucumber / Ruby

Friday, 18 February 2011

Page 39: iOS Testing with Frank

FrankDriver

FrankServerTests

iPhoneApp

UISpecCucumber / Ruby

Friday, 18 February 2011

Page 40: iOS Testing with Frank

FrankDriver

FrankServerTests

iPhoneApp

UISpecCucumber / Ruby

“frankly”

Friday, 18 February 2011

Page 41: iOS Testing with Frank

Frankusesaccessibilitylabels

Friday, 18 February 2011

Page 42: iOS Testing with Frank

frankly.my_dear do |i| dont_give_a_damn!end

Friday, 18 February 2011

Page 43: iOS Testing with Frank

UISpec

UIQuery

Frank

Frankly

frankly.my_dear do |i| dont_give_a_damn!end

Friday, 18 February 2011

Page 44: iOS Testing with Frank

[app.tableView.label text:@"User"];

UISpec

UIQuery

Frank

Frankly

frankly.my_dear do |i| dont_give_a_damn!end

Friday, 18 February 2011

Page 45: iOS Testing with Frank

[app.tableView.label text:@"User"];

UISpec

UIQuery

Frank

Frankly app tableView label text:’User’

frankly.my_dear do |i| dont_give_a_damn!end

Friday, 18 February 2011

Page 46: iOS Testing with Frank

Friday, 18 February 2011

Page 47: iOS Testing with Frank

Frank Steps

Scenario: default users should be present at startup

When I start the app

Then I should see “Users”

Friday, 18 February 2011

Page 48: iOS Testing with Frank

Frank Steps

Scenario: default users should be present at startup

When I start the app

Then I should see “Users”

Then /^I should see "([^\"]*)"$/ do |expected_mark|

check_element_exists("view marked:'#{expected_mark}'")

end

Friday, 18 February 2011

Page 49: iOS Testing with Frank

Demo

Friday, 18 February 2011

Page 50: iOS Testing with Frank

The RoadAhead

Friday, 18 February 2011

Page 51: iOS Testing with Frank

Stewart Gleadow

[email protected]

@stewgleadow

Friday, 18 February 2011

Page 52: iOS Testing with Frank

References• github.com/moredip/frank & http://groups.google.com/group/frank-discuss

• code.google.com/p/uispec & http://groups.google.com/group/uispec

• softnoise.wordpress.com/2010/11/14/ios-setting-up-a-test-environment/

• cukes.info

• cuke4ninja.com

• The RSpec Book

Friday, 18 February 2011