Tuesday, December 20, 2011

Let’s Write an Automated Test Framework

I am a huge one-time fan of HP’s BPT framework.  Test execution may be slow, but it is the best tool I have found for a growing test team to use in a whole-team test automation environment.  BPT has powerful abstraction of test scripts to make it easy for business-focused people and new test team members to build tests.  It enables automators to build tests using simple keyword-driven techniques and more powerful and sophisticated test scripts when the situation demands it.  As soon as I learned to ignore the misguided documentation from HP on how to use BPT, it became a very powerful tool.

Over the past year, I have been struggling with the new (and supposedly improved) version of QC/BPT.  The past year has been a mess.  What was a promising enterprise solution for long-term use has, in my mind, crumbled into a pile of what-could-have-been.  As it looks now, it is time to write an open-source automated test framework.

There are many others who have gone down this path.  Most have mixed results (we have looked for other frameworks that meet our needs and haven’t been satisfied with anything yet).  I am still convinced that BPT (as we implemented it) is the best test automation framework out there.  And since so few other people have found BPT (or found it to be a suitable solution for them), I think my team is uniquely (I am sure we are not alone) suited to drive the development of this project.  We have seen what works well.  We have solved the key problems of automation Fire Swamp -- Remember the movie the Princess Bride (1987) when Westley and Buttercup escaped from the Lightning Quicksand?

Westley: No, no. We have already succeeded. I mean, what are the three terrors of the Fire Swamp? One, the flame spurt - no problem. There's a popping sound preceding each; we can avoid that. Two, the lightning sand, which you were clever enough to discover what that looks like, so in the future we can avoid that too.

Of course, in the next moment, he learns about the Rodents of Unusual Size (ROUS) -- the third of the problems.

In the case of test automation, the three terrors are lack of readability, lack of maintainability, and lack of flexibility.  By using our implementation of BPT, we know what problems to avoid.

Look out HP, I think we might write a framework.

Sunday, December 4, 2011

The Role of Reputation in Agile Testing

In Agile development teams, your reputation is more important than ever.

In traditional development teams, your peers certainly had opinions about you  They might love you or hate you or have no idea who you are.  The formal process of traditional development protected you, and it limited the impact that your reputation had on your professional work product.  For example, people from other groups may have approve test scripts you write.  Or you might execute test scripts written by someone else.  Your personal responsibility for your work was limited.  As long as you mechanically performed your tasks, you were covered.  

All that changes in agile.  In the most agile of shops, agile teams are self organizing, and the agile tester has a lot of discretion.  You are no longer protected by process. You can succeed or fail on your own.  

The roles on agile teams are not clearly defined in a traditional sense -- everyone should work together to complete the task, regardless of a person’s formal role.  Agile teams should be self organizing and figure out the best way to do things on their own.  What is best depends on a lot of things:  time, skills, interests, and trust.  Trust is based on reputation, and reputation is based on the sum of your past work.

At my company, we adhere strongly to the principles of agile, and development teams make a lot of their own decisions.  For example,  the amount of coding that happens during a sprint ultimately depends on the feeling of the team.  Of course, our teams are committed to delivering the most functionality they can each sprint, but the code has to be clean and the team has to have confidence in the work product.  

We deliver develop and deliver code in a two-week sprints.  In two weeks, there are only ten business days, and all our code is delivered into production at the end of the sprint.  Whether programmers feel comfortable creating new code for seven days or nine days during a sprint depends on things like testing confidence.  From the testing perspective, we need to provide good regression coverage (and share our results regularly with the team), and we must make everyone feel good about the sprint-level work we are doing.  It is, of course, essential to keep up to date with testing (immediate feedback), but the perception of success is greatly influenced by our reputation.  In this sense, a tester’s reputation has a real impact on the output of the development team.