One area that testers might be able to enhance their contributions to software development teams is how we perceive and contribute to unit testing. Being able to influence this type of testing in a positive manner is a skill that testers will need to get to grips with, as more companies start to embrace a model of lone testers in cross functional teams. The shift of focus from primarily the testing that testers do, to the testing that the team does, is a key shift in thinking and behaviour.
To facilitate this shift, I believe testers busting their own illusions about this aspect of building something good would bring us much closer to developers, and help us realise what other layers of testing can cover most effectively. The last point is pertinent here, as knowing and guiding unit testing brings the role of integration, acceptance and exploratory testing into sharp focus.
3. A Testers* Guide to the Myths,
Legends and Tales of Unit Testing
* Disclaimer: this definitely maybe applies to all disciplines in software
development, not only testers but I’m a tester so its from my point of view.
4. This is Gus
• Speakeasy
• Great
mentor
• Taught me
speaking
wasn’t only
about me
9. • Pyramids
• Myths
• Legends
• Tales
• Changing
perceptions
–As a tester
–How devs can
help
Coming up…
10. • Useful frame of reference?
• Dogma justifying blood
sacrifice?
• Triangle anyway
That Pyramid…
11. • That unit tests fill in the bottom of the
pyramid
• That unit tests remain in the bottom layer of
the pyramid
• That unit tests are inherently more valuable
than other layers of tests
• That unit test coverage is irrelevant to
manual testing
• Large number of unit tests can replace
integration tests.
• You don't need additional tests because
everything is unit tested
• If you have a suite of unit tests you don't
need to do much other testing
The source…?
12. • Based on
reality
• Explains
something
we don’t
or can’t
understand
• Moral
• Y2K
Myths
13. Myths
• What’s a unit?
• Existence ==
good
• Tests exist to
find bugs
• Unit tests
communicate
intent
• Document the
code
14. Myths
• I’ve written
my unit test
plan.
• Erm…
• But they
were testing
• Right or
wrong to
challenge?
15. • Based on a
true event
• Hero(es) in
fantastical
location
• Origin
story
• Snowbird
Ski Resort
Legends
16. Legends
• TDD is testing, design, both
and/or neither
• Power of Clean Code™