Skip to main content

Drucumber: testing made easy | how to delegate Drupal testing to your project manager

Senior Developer
Mar 02, 2010

Drucumber is a new module that converts native-language like text into a Drupal Simpletests. The idea is not entirely new, other projects like Cucumber have worked to solve this problem, but none of them does so for Drupal (at the time being). Drucumber also doesn't use Cucumber's syntaxis, it uses YAML instead. YAML has a lot of existing tools for processing and has the structural properties of XML while being more accessible for end users. Using YAML makes it also possible to later implement a backend for RDF or RDFa which will open some really exciting possiblities (integration with the semantic markup editor, for instance - remember Spezzle?). The goal of this module is to allow end-users and project teams to implement behavior driven development: specify behaviors or features of a Drupal site in a test and never again worry about checking it. Here's an example: [gist:4135428] After processing the mighty black box of my module delivers the following: [gist:4135429] The indenting is a bit messy, but you can see that this is an actual test. Currently, the module only works with drush (same way as a regular compiler), but the node support and services integration is on it's way. As mentioned before, possible implementations for RDF integration are also being evaluated. The API is ready for further implementations, and there is plenty of documentation in docs.php.

Tamás is responsible for the development and design of custom Drupal modules and back-end solutions. He's a self-taught programmer, with his main focus on Drupal, Go and iOS development. Besides programming languages, he's interested in distributed computing, computer graphics, image processing and security. He has a couple of contributed modules on Drupal.org, and he completed the Summer of Code at Drupal in 2010 and 2011. His bigger projects at Pronovix include participating in Drupal Gardens development, helping to create sites for Warner Music Group, Pfizer and Florida Hospitals. He did performance optimizations on Qatarliving. He's one of the main contributors to the Brightcove module used by large Drupal sites worldwide.

Newsletter

Articles on devportals, DX and API docs, event recaps, webinars, and more. Sign up to be up to date with the latest trends and best practices.

 

Subscribe