20
Taming the Testing Beast Tuesday, October 23 rd 2012 Daniel Doubrovkine (dB.) @dblockdotorg #agiledc 2012

Taming the Testing Beast - AgileDC 2012

Embed Size (px)

DESCRIPTION

Your first win is to fully rely on test automation. But then it becomes a problem by itself.

Citation preview

Page 1: Taming the Testing Beast - AgileDC 2012

Taming the Testing Beast Tuesday, October 23rd 2012

Daniel Doubrovkine (dB.) @dblockdotorg #agiledc 2012

Page 2: Taming the Testing Beast - AgileDC 2012

http://art.sy/artwork/francisco-de-goya-saturn-devouring-one-of-his-sons-from-the-series-of-black-paintings-dot

State of Testing: Scary!

Page 3: Taming the Testing Beast - AgileDC 2012

Test Automation @

Independent Teams

Hardware Platforms

Vendors

3× automated voting user acceptance tests QA

Page 4: Taming the Testing Beast - AgileDC 2012

Test Automation @

Test Code vs. Code 1124×

http://www.sqlite.org/testing.html

Page 5: Taming the Testing Beast - AgileDC 2012

Test Automation @ Your Company

Dev : Test 1:1

some automation some people test some software often doesn’t install

QA

Page 6: Taming the Testing Beast - AgileDC 2012

Test Automation @ My Company

Testers Formalities 0

100% automation continuous everything 8 developers 8 hours of sleep / day

QA

http://art.sy/artwork/conrad-shawcross-chord

Page 8: Taming the Testing Beast - AgileDC 2012

Technology and Tools

RSpec BDD : it “does X”

Mongo Data Models : ODM with “real” data

Ruby API : HTTP request – response

Integration : Capybara

Page 9: Taming the Testing Beast - AgileDC 2012

Technology and Tools : Mongo ODM + Fabricators

context “spline” do

let(:spline) { Fabricate :spline }

it “reticulate! updates reticulated count” do

expect {

spline.reticulate!

}.to change(Spline.reticulated, :count).by(1)

end

end

Page 10: Taming the Testing Beast - AgileDC 2012

Technology and Tools : Ruby API context “spline” do

it “create” do

expect {

post “/api/spline?name=test”

response.status.should == 201

}.to change(Spline, :count).by(1)

end

end

Page 11: Taming the Testing Beast - AgileDC 2012

Technology and Tools : Integration context “spline” do

let(:spline) { Fabricate :spline }

it “displays a spline” do

visit “/spline/#{spline.id}”

page.should have_css “.spline[id=#{spline.id}]”

end

end

Page 14: Taming the Testing Beast - AgileDC 2012

Break Things Up

Multiple Applications

Page 15: Taming the Testing Beast - AgileDC 2012

Run Tests in Parallel

Multiple Test Suites

http://artsy.github.com/blog/2012/10/09/how-to-run-rspec-test-suites-in-parallel-with-jenkins-ci-build-flow/

Page 16: Taming the Testing Beast - AgileDC 2012

Understand Disable Failing Tests

One Example at a Time

No Hacks Allowed

Wait for Explicit Events

Combine Techniques

Track Failures

http://artsy.github.com/blog/2012/02/03/reliably-testing-asynchronous-ui-w-slash-rspec-and-capybara/

http://www.friendshipismagic.org/forum/members/captain-falcon/albums/miscellaneous/9452-wat/

Page 18: Taming the Testing Beast - AgileDC 2012

Test Automation is Not a ______ Problem Not a Management Problem

Not a Money Problem

Not an External Problem

Not a Consultant’s Problem

Page 19: Taming the Testing Beast - AgileDC 2012

Test Automation is a Team Culture Problem Remove Those that Talk About Testing

Hire From Open-Source

Remove the Safety Net

Page 20: Taming the Testing Beast - AgileDC 2012

Daniel Doubrovkine (dB.)

@dblockdotorg