Do the Twist: A review of Thoughtworks new Test Automation Tool
If you want to automate these days you have two choices: you can do it for free and go with open source tools or you can pay the GDP of a small country and fill the coffers of some big evil corporation. Recently I’ve been looking at a tool that is potentially a middle ground (plus the corporation whose coffers you fill isn’t really evil - more well-intentioned and known for innovative ideas).
One of the biggest challenges we face in the open source automation tool arena is the lack of any good test case management. Part of the reason Mercury/HP has been able to gain the lion’s share of the automation market is because they have been able to sell companies the concept of an entire system of tracking and managing requirements that can be traced through to defects. This is an area where open source tools have simply not caught up. When I walk into an organization that is struggling to convert from expensive bloated mercury-based automation to open source automation, the biggest barrier to entry that I hear repeatedly from QA professionals is that there is no existing open source automation tool that provides an easy means for managing and tracking test cases and tying them directly to requirements (Some of you will say Fit and Fitnesse is the tool of choice for that, but the pros and cons of that option is another blog post). Until now, the general philosophy was that applying the kind of rigid control that test case management requires to open source automation would kill the “agile” spirit of the tools.
I’ve recently been evaluating TWIST a new testing IDE built by Thoughtworks using eclipse as the underlying platform. To be clear, this is not an open source tool. It is a commercial tool but will be selling at affordable prices accessible to small businesses etc. I have to admit, at first I was extremely skeptical about using an IDE paradigm for a new automated test tool, but I’ve been looking at the beta version of the product for the past few days and I’m convinced of the power of this tool to help solve some of the biggest hurdles we face with TCM in open source tools. This tool leverages the power of domain specific languages in a manner I’ve never seen before and the potential of this is staggering. Mark my words when I say this is the way of the future. Okay, so in the interest of full disclosure I should mention that I’m currently an employee of Thoughtworks. But anyone who knows me would tell you that I will not hesitate to openly criticize a bone-headed move by Thoughtworks (and believe me there are plenty of those to choose from). I’m a big believer in free expression and open discussion. Perhaps to my detriment, fear of losing my job (or alternatively benefitting in my job) is not really a motivating factor in my blogging decisions J
So here’s the story of my journey from skeptic to fan of TWIST:
- I saw a super early demo of it at a Thoughtworks away day in Denver last year. I wasn’t terribly impressed. It just seemed like we were using eclipse to write test scripts. I can use notepad or scite or any of a thousand existing applications for that. There was nothing extraordinary about what I saw.
- Recently, I began consulting with a client where my role is to help them identify support structures and practices that will help them put sustainable test automation in place across the organization. The client has low expectations of my success rate because every automation project they’ve attempted has either been abandoned or ended in failure. I talk a lot about the idea of developing a domain specific language as that seems to be the ideal solution for this specific client. They have no idea what I’m talking about and nod glassy-eyed while I extol the virtues of domain specific languages. I realize I just need to show them. I start writing Ruby scripts.
- Coincidentally Thoughtworks sends out an announcement that TWIST is available for internal review. I request a license.
- Installing was quick and painless, although without the twist license you just have eclipse and nothing else
- Finding the TWIST tutorial was a little awkward but I managed to find it within the first few minutes of running the tool
- Before going through the tutorial I decided to jump right in and run the hello world sample script. The script opens the browser (using selenium), goes to the google homepage, types in “Thoughtworks” and gets the results. It works like a charm. So far so good.
- Then I decide to examine the script. Here’s the snippet of code:
At Google: search for “Thoughtworks”
Really? I change the word “Thoughtworks” to “Yellow” and re-run the script. It goes to google, types the world “Yellow” and returns the results.
Wow! As I go through the rest of the tutorial and start experimenting on my own I start to get really excited because TWIST uses the power of an IDE to create a tool that will allow BA’s/QA’s to write their acceptance criteria and tests in plain English and then they have the means to convert those scripts to automated tests on the spot by either selecting from a pre-existing library of automated functions or writing a new one. In this way every script is driven by the requirements and needs of the business and is permanently associated with a living record of those requirements (which can of course be easily modified along with the code it describes). An IDE is really the perfect choice for this because it’s a mature and well-adopted tool for managing code. It makes reuse and refactoring of scripts as easy as a few key strokes or the click of a mouse. As for test case management, since you’re using an IDE you can connect your scripts directly to the code they test and as you build them out, the documentation for the automated scripts is built into the domain language so code will be delivered with the written requirements, acceptance tests, and automated system tests all built in. At least that’s potentially what could happen. Ultimately, like everything else out there, this is just a tool that makes it easier to be more effective in test automation. Whether it is used that way depends on the person wielding it.
In the immediate future, though, this is exactly what I need to demonstrate the potential of domain-specific languages to my client. Now I’m working on a kick-ass demo using twist to build them a mini DSL so they can see what I’ve been talking about. Thoughtworks Studios has made my job worlds easier.
May 14th, 2008, posted by mfolsom