Transcript
Page 1: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

Next  Genera*on  Tes*ng  Conference  (c)

Agile  Tes)ngAn)-­‐Pa.erns  &  Rescue  Strategies

by

Karthik  SirasanagandlaAgile  Coach

Independent  Consultant  |  Industrial  Logic

Again  on  21st  October  2013  |  Hotel  Savera,  Chennai

Page 2: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

What do you expect out of this session?

Is anyone having a painful story to share?

Page 3: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

The Big Things That Go Wrong..

The Details That Go Awry...

The Rescue Strategies..

Page 4: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

The Big Things That Go Wrong!

Page 5: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

It’s So SCARY!!!

Page 6: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

• Nothing in life is to be feared, it is only to be understood. -- Marie Curie– You’re not afraid to try again, you’re just afraid of

getting hurt.

• In Everyday Scripting with Ruby, Brian Marick advises to learn to program by writing one. #FailProof

• Learn By Doing

Page 7: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

Quiz: Guess the reason for this!

Page 8: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

Silos

Scrum MasterManager DeveloperQA

...

Page 9: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

Results Over Reasoning

Page 10: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

• Cost: Manual Versus Automation• Business Value of Deliverable• Automate Everything That Is Repeatable

Page 11: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

Discontinuous Integration

Page 12: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

CI in Progress

Page 13: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

What’s Your Test Architecture?

Page 14: Agile Testing Anti-Patterns and Rescue Strategies (Version2)
Page 15: Agile Testing Anti-Patterns and Rescue Strategies (Version2)
Page 16: Agile Testing Anti-Patterns and Rescue Strategies (Version2)
Page 17: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

Quiz Time• What is the wolf that can huff and puff your hay stack in

your test pyramid?

• What is the wolf that can break your wooden stack in your test pyramid?

• Who is the wolf that can break you brick stack in your test pyramid?

• What is the moral of the story? Just build unit tests???

Page 18: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

Old Is Gold

Page 19: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

One Huge Monolithic Test Suite

Page 20: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

The Details That Go Awry!

www.unicomlearning.com

Page 21: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

I Love Se IDE

Page 22: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

X-Path Rocks

Page 23: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

Where’re The Page Objects?

Page 24: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

Page-Object Littered With Assertions

Page 25: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

Bad Code#my_target_page.rbdef verify_edit_link_presence //BAD: Assertion in Page-Object has_link?("Edit").should be_true end

#my_target_specit "blah blah blah" @my_target_page.do_some_action @my_target_page.verify_edit_link_presenceend

Page 26: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

Good Code#my_target_page.rbdef has_edit_link? has_link?("Edit")end

 #my_target_specit "blah blah blah" @my_target_page.do_some_action @my_target_page.has_edit_link?.should be_trueend

Page 27: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

I love to sleep

Page 28: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

Scenario To Code: Good Versus BadAs a userI should be able to add notes to the tableso that the information is recorded for future reference.

def add_and_save_notes notes fill_in("my_target_text_box", :with => notes) click_button "Save" # This makes an AJAX request and adds new row to the table upon successfully saving sleep(3) #<-- This is BAD code.end

def add_and_save_notes notes ... wait_until { has_text?(notes) } #<-- This is GOOD practice that enables test stability and hence faith in test resultsend

Page 29: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

Asserting message for exactness • #my_target_spec.rb describe "save notes" do it "should add notes as new row to table upon successful save" do notes = "sample notes" expected_update_message = "Your note is added successfully!" @my_target_page. add_and_save_notes notes @my_target_page.update_message.should == expected_update_message endend

Why measure exactness???

Page 30: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

Duplication makes life easy

Page 31: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

Long live dead code!!!

Page 32: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

Rescue Strategies

Page 33: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

Didn’t we discuss about it all the way?...Do you want to know anything more?

Page 34: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

References Resources

• Agile Testing by Lisa Crispin and Janet Gregory

• http://patrickwilsonwelsh.com/• http://kartzontech.blogspot.in/• http://blogs.agilefaqs.com/2011/02/01/

inverting-the-testing-pyramid/• Everyday scripting with Ruby for Teams,

Testers and You.

Page 35: Agile Testing Anti-Patterns and Rescue Strategies (Version2)

Karthik SirasanagandlaAgile | Lean Coach

Images Sources:http://www.geograph.org.uk/photo/122440http://www.flickr.com/photos/philipbitnar/3194364095/http://www.flickr.com/photos/un_photo/3331240051/in/photostream/http://www.synnovatia.com/business-coaching-blog/bid/132417/Getting-Past-Your-Fears-and-Growing-a-Successful-Businesshttp://www.global-integration.com/cartoons/silos/http://www.kent.ac.uk/secl/philosophy/jw/reasoning/club/http://www.freefoto.com/preview/904-22-3505/White-clouds-and-blue-skyhttp://www.flickr.com/photos/nagesh_kamath/4714936714/http://blogs.agilefaqs.com/2011/02/01/inverting-the-testing-pyramid/http://www.flickr.com/photos/w9ned/3958782404/http://commons.wikimedia.org/wiki/File:Selenium_IDE.pnghttp://commons.wikimedia.org/wiki/File:XPath_example.svghttp://www.flickr.com/photos/betobaibich/266557188/http://commons.wikimedia.org/wiki/File:Littering_in_Stockholm.jpghttp://commons.wikimedia.org/wiki/File:Gray_paper_bag_with_sad_smiley_over_head.jpghttp://www.flickr.com/photos/byronpeebles/3337412761/in/photostream/http://www.fotopedia.com/items/flickr-24930799http://www.flickr.com/photos/asterix611/5120445522/in/photostream/http://philby.deviantart.com/art/Threatening-Behaviour-lines-72724012http://martinfowler.com/bliki/TestPyramid.html

@kartzontech


Top Related