SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
Open source bridge testing antipatterns presentation
13.
Why Automated Testing? <ul><li>Prevents regressions </li></ul><ul><li>Improves confidence </li></ul><ul><li>Documents requirements </li></ul><ul><li>Catches errors before codes ships </li></ul><ul><li>You fill in the blank _________ </li></ul>
14.
Overheard Reasons Not to Test <ul><li>Don’t trust the tests </li></ul><ul><li>Who tests the tests? Quis custodiet ipsos custodes? </li></ul><ul><li>Makes refactoring harder </li></ul><ul><li>Not enough return on investment (ROI) </li></ul><ul><li>Too hard and/or time consuming </li></ul>
18.
testing, deploying, releasing, exercising, meditating, writing, public speaking
19.
How Often? <ul><li>Before deployment or release </li></ul><ul><li>After every commit: CI (Continuous Integration) - Jenkins, Cruise Control, BuildBot, Cerebrus, CI Joe </li></ul><ul><li>Before every commit (or push): discipline, git hooks </li></ul><ul><li>Every save: autotest, watchr </li></ul>
20.
Not Fixing Broken Tests Before Committing New Code
25.
So slow that rewriting it in PHP would make it faster
26.
How to Get Faster <ul><li>Make your implementation code faster </li></ul><ul><li>Run your tests in parallel </li></ul><ul><li>Optimize your tests (new framework, trick garbage collector, rewrite culprits) </li></ul><ul><li>Mark some tests as slow and only run them occasionally </li></ul>
40.
<ul><li>The Dodger - Never tests desired behavior </li></ul><ul><li>The Stranger - Misplaced tests </li></ul><ul><li>Local Hero - Worked on my dev box </li></ul><ul><li>Generous Leftovers - Fills your hard drive </li></ul><ul><li>The Giant - You may have a God object </li></ul><ul><li>The Loudmouth - Spams your test logs </li></ul>Other Antipatterns
Talk about Design Patterns general reusable solution to a commonly occurring problem
Realized while writing this talk that I was focusing on what pissed me off and made me not want to talk about it. Should be humor in testing.
Red failing Green passing
Not really an antipattern since it’s really only solving being lazy
CI essentially glorified cron job
The Joel Test #5: Fix bugs before writing new code Mention Lava Lamps
Martin Fowler Mocks aren't Stubs. Never met a mockist whose tests I liked. Not mocking means mini integration tests. Possibly controversial. When to mock: code you don't control - file system, web server, external libraries like ssl
Too much mocking might indicate this
Everyone has their own terms
Test Driven Development prevents this
Behaviour Driven Development is a larger term with more meaning
These are annoying but can’t be ignored. How to find these failures - binary search.
Testing antipatterns can indicate antipatterns in your implementation code
Data driven web apps tend to be even worse
0 likes
Be the first to like this
Views
Total views
1,618
On SlideShare
0
From Embeds
0
Number of Embeds
129
You have now unlocked unlimited access to 20M+ documents!
Unlimited Reading
Learn faster and smarter from top experts
Unlimited Downloading
Download to take your learnings offline and on the go
You also get free access to Scribd!
Instant access to millions of ebooks, audiobooks, magazines, podcasts and more.
Read and listen offline with any device.
Free access to premium services like Tuneln, Mubi and more.