DevOps Zone is brought to you in partnership with:

Mitch Pronschinske is a Senior Content Analyst at DZone. That means he writes and searches for the finest developer content in the land so that you don't have to. He often eats peanut butter and bananas, likes to make his own ringtones, enjoys card and board games, and is married to an underwear model. Mitch is a DZone Zone Leader and has posted 2574 posts at DZone. You can read more from them at their website. View Full User Profile

Twist 2.0: Test Automation in BDD - Now with Groovy

03.02.2010
| 16921 views |
  • submit to reddit
A lot of organizations transitioning to agile are focused on getting planning and communication practices in place, but they tend to neglect engineering practices until later.  ThoughtWorks Studios tries to correct this anti-pattern with its ALM tools, which are designed to handle changing requirements in the development process and adapt to the way agile teams work.  Another longstanding problem in the developer world is the knowledge barrier between programmers and non-programmers, which leads to poor collaboration in software production.  DZone spoke with Clint Sprauve, the Twist product manager, and Cyndi Mitchell, the managing director of ThoughtWorks Studios, about their approach to test automation and functional testing in their newest version of Twist.  Twist 2.0, which was just released, features Groovy support, Hybrid Test Execution, and continues the Behavior Driven Development approach.

With agile, the changes in software requirements are so frequent that many stakeholders have trouble keeping up with test automation.  As a result, Sprauve says they don't try to keep up and requirements are not in sync with testing, so more time is actually spent fixing the tests to meet all the requirements.  ThoughtWorks Studios' answer to this problem is a testing suite (Twist) based on Behavior Driven Development (BDD).

About Behavior Driven Development
BDD encourages collaboration between developers, QA, and various other non-technical business participants.  It extends TDD by using a domain (retail, manufacturing, etc.) specific language to write tests.  It's a language that non-programmers can comprehend and use to coordinate with developers and QA folks.  In Twist, BDD allows non-programmers to run requirements as test specifications so that the developers know what they're building as plans change.  This approach gives tests more longevity as reusable assets, and not just as throw-away artifacts.

Twist Interface for Business user, Tester, and Developer interaction



With Twist, business users can express testing scenarios in plain english using the domain specific language (DSL).  The combined interface provides a place where developers and test automation specialists can track the changing requirements from the business user in real time and implement those changes in the tests.  Users can rephrase a step without breaking the automation, keeping scenarios in sync.  Unlike Keyword Driven Development, there's a layer of abstraction that keeps the automation intact when changes are made to the requirements.  This allows the same test cases to be used if, for example, you migrate from a C++ system to a Java system.

Twist 2.0 New Features

  • Hybrid Test Execution:  Allows the execution of manual and automated test steps within the same scenario.  This lets users create automated steps for those that are still working on manual testing.
  • Groovy Support:  Simplifies the on-ramping for those doing test automation in Groovy.
  • Sahi Support:  Abstracts out many difficulties in test automation for web applications.  Twist now supports both Selenium and Sahi (which is similar) for web testing.
  • Java SWT support:  Allows testing of Java SWT (Standard Widget Toolkit) based applications.
  • Data Driven Test Scenarios:  Provides fuller testing coverage for applications with many data inputs (address, name, etc.)

Twist uses an Eclipse plugin to provide its testing IDE.  It's backend is written in Java, making it easier to find testing resources.  Twist also supports waterfall methodologies in addition to agile methods.  Finally, Twist 2.0 will run on the latest versions (and many older versions) of Windows, Mac, and Linux.  ThoughtWorks Studios also develops an agile management suite (Mingle) and a release management and CI tool (Cruise).