Selenium Powered Drupal Black Box Testing

· 1 min read

Original publication

This post was originally published on April 28, 2006 on The Standard, the Raincity Studios blog, credited to “Roland Tanglao”. This post reflects the context and tools of its time; some links and services mentioned no longer exist.

View the original on the Internet Archive

I have a dream: Everything in Drupal is automatically tested with both user oriented "Black Box" tests and developer oriented "White Box" tests. Of course we have a ways to go since Drupal wasn't built with this philosophy in mind.

However we are starting to see the tools appear thanks to the wonderful Drupal community: I think Selenium (and the recently introduced Selenium module for Drupal, thanks Grugnog2!) for black box testing and simpletest module for whitebox testing are the current tools of choice.

For now I am focusing on the Selenium side. But in short order, I am going to put together some simpletest tests as well.

Here's my 'Hello World" Selenium test which of course for me is "Create a blog post":

Test2
open | http://localhost/drupal-4.7.0-rc3/node/add/blog
type | edit-title | title of Test blog post
type | edit-body | body of Test blog post
clickAndWait | //input[@value='Submit']
assertTextPresent | Your blog entry was created.

Interested in working on realizing the automated Drupal testing dream as well? Let me know (roland AT bryght.com)! Love to collaborate with you on this.

Your business deserves to be found.

Tell us about your project. We answer in English or French, and we travel anywhere in the MRC de Papineau.

Display

Your choices stay in this browser. Nothing is sent.

Text size
100%
Colours
Reading
More help
Site accessibility