Effective Test Automation Isn’t Created in a Vacuum
April 2nd, 2008
Filed under Agile, Ruminations, Teamwork, Test Automation
“They never give us enough time to automate our tests, and then they
complain at us that we don’t test fast enough!” J. shook her head.
“And when I want to hire more people to help automate, they tell me I
have too many people already! Management blames me because testing
takes too long, but they won’t support me in fixing the problem.
What’s wrong with them!?!”
J. is a QA manager in an organization that’s adopting Scrum. She’s
frustrated, and understandably so. From her point of view, she’s
being squeezed in all directions. The developers are producing
releasable code every month. But for her team to run a regression
test cycle - mostly manual - takes 6 weeks. That’s too long. Just
one test cycle exceeds the sprint length by 2 weeks. J. feels
tremendous pressure to reduce the time it takes to test the software.
Yet at the same time, she feels like she’s not getting any support to
do the one thing she can see that will help reduce the test cycle
time: automate the regression tests.
I’ve had some visibility into J.’s situation for some time now. J.’s
team has been trying - and failing - to automate the regression suite
for the last two years. They aren’t making any headway because as
soon as they get one script working, another one breaks. The
automation is brittle, error-prone, and incredibly expensive to create
and maintain. That’s in part because they’ve been using a cumbersome
commercial tool that doesn’t support creating maintainable tests.
It’s also because the user interface was not designed with test
automation in mind. Many UI elements don’t have IDs, and the ones
that do use automatically generated IDs that change with each build.
In short, the combination of the tool and the software under test
equals a test automation nightmare. It’s no wonder J.’s team is not
making headway.
Yet J. persists. Doing more of the same kind of test automation
that’s already failing doesn’t make much sense to me, but she
disagrees. “We just need more time!” she says.
The problem is that J. is still thinking in terms of silos. She
thinks all testing tasks must be done by QA people using specialized
QA tools. It simply would not occur to her to suggest that
development help automate tests. Nor does she suggest that developers
and testers collaborate on making the UI more testable. Instead, she
says, “QA can’t go that fast. Slow down.”
J. doesn’t want to acknowledge that test automation created by a
siloed QA team working in isolation to reverse-engineer existing
software and automate tests against an untestable UI using proprietary
tools accessible only to a few select team members is guaranteed to be
incredibly expensive both to create and to maintain, and also
ridiculously fragile. In short, her approach just isn’t going
to work.
Unfortunately, J.’s story is likely to have an unhappy ending - at
least for J. and her team. Her strategy of trying to get development
to slow down, and telling management that they can’t release monthly,
is backfiring. The development team is already bypassing QA for small
changes and getting good results. But J. is undeterred. My past
observations tell me that no matter what the reaction of the people
around her, she will keep doing the same thing and expect different
results.
But maybe, just maybe, by telling J.’s story here, I can help someone,
somewhere.
So allow me to repeat the moral of this story:
When QA works in isolation, creating automated tests after the
software is theoretically “done,” using proprietary tools that are
available only to a select few team members, the results will be a
fragile, unmaintainable mess.
For test automation to work well, it must be created in collaboration
with the whole team and the resulting test automation code must be
treated as code. That means it should be versioned with the source
code, executed with each and every build, and created and maintained
as part of the overall development cycle rather than as an afterthought.
And when a Test/QA group insists on keeping within their silo when the
rest of the organization adopts Agile practices, they will end up
bypassed and irrelevant as the rest of the organization finds ways to
move forward without their help.