Example of using Selenium to automate Drupal configuration changes across several servers
During a recent push to a production server, I recorded a Selenium test to illustrate one of its uses, which is porting Drupal configuration changes from one server to another reliably. In this example, I use a Selenum test suite to accomplish several tasks, including:
- Import a content type
- Import a view
- Install modules
- Create a multi-paned panel page
- Fill out several configuration forms.
This series of tests saved me a lot of time and reduced the probability of errors to virtually nothing. In the past, I would keep a list of configuration changes to port, and do them manually to push from a development server to staging, and then from staging to production. It's time-consuming and error-prone that way.
This video just shows the tests running with me narrating (rather poorly). I just wanted to actually show what was possible to whet the appetite of folks who haven't used Selenium before. I hope to add more tutorial-style videos later.
Recent blog entries
Twitter feed:
- Letter to a disgruntled module user http://is.gd/eLI2y3 days ago
- How to easily upgrade Drupal from one minor version to another with a patch file http://is.gd/ezL2s1 week ago
- Restarting my mac for the first time in 24 days #fb2 weeks ago
- Why does it always catch me off guard when people don't look like their profile pics? I should be used to this from my internet datin... #fb2 weeks ago
- @rock_soup What command was that?2 weeks ago
- @dale42 A belated agreement about the devil's work in absolute URLs. :)2 weeks ago
- Save the Planet! Well, the Drupal Planet (actually, the Drupal Planet log files) http://is.gd/egxwt2 weeks ago
- The Save Joseph campaign is over, thank you! (plus, summarization of social networking techniques applied) http://is.gd/eb1Y1 #fb3 weeks ago
- @simonsurtees Great re:evernote offer. In next steps I want to improve API and allow for collaborative content creation. Should be fun!4 weeks ago
- Only 12 hours left to Save Joseph - $150 bounty, infinite karma points, excitement abounds! http://savejoseph.org #fb4 weeks ago
Topics
- activism
- apple software
- book reviews
- design
- Drupal
- drupal administration
- drupal community
- drupal events
- drupal modules
- drupal resources
- freaky stuff
- geeky entertainment
- iphone ipod touch
- jquery
- learning
- life hacks
- looping
- maps
- minimalism
- music
- philosophology
- presentations
- productivity
- rambling
- restraint
- software
- theming
- treadmill desk
- usability
- usability testing
- video demonstrations
- web hosting
- original songs
- This American Life
- evernote
Blog archive
- March 2009 (2)
- April 2009 (15)
- May 2009 (10)
- June 2009 (3)
- July 2009 (3)
- August 2009 (6)
- September 2009 (2)
- October 2009 (4)
- November 2009 (3)
- December 2009 (1)
- January 2010 (1)
- March 2010 (1)
- June 2010 (1)
- July 2010 (46)
- August 2010 (5)










Comments
Added to DrupalSightings.com
that was really cool
I am just starting with selenium and your video gave me so many new ideas to proceed on
thanks
sumitk
http://twitter.com/sumitk
Nice post, this certainly is a great way to automate some configuration changes across sites. :-)
We've been working on the Patterns module for automating Drupal configuration to accomplish similar tasks. The idea being that you can create an update pattern and run it locally on dev, copy your db down from live to staging and run your patterns on staging. Make sure everything is good and then run them again on live.
We've planned to have recording capability (it's not finished yet) similar to Selenium or macro.module to run through a few steps and have it spit out a pattern or set of patterns for you.
Hopefully soon we'll be able to do the same things that can be done with the Selenium method with the added benefit of the configurations being simple easy to read and update files (yaml or xml) that can live in version control and be reused.
Hi Chris,
I've watched a demo of the Patterns module at BADCamp, and have been looking forward to learning more about it. I'm really looking forward to the possibilities there. I see it replacing some of what I currently using Selenium for, but it will most likely continue to be a useful tool where a programmatic solution is to unwieldy or impractical, especially for regression testing (not demonstrated in this video). I remember asking you about the macro recording after the presentation, because it seems like that would really help bring the power of Patterns to admins as well as developers.
Thanks for piping in!
Have a look at iMacros, https://addons.mozilla.org/en-US/firefox/addon/3863
Its a great "macro recorder" Firefox addon.
very good informations realy , thanks....evden eve nakliyat
I am just starting with selenium and your video gave me so many new ideas to proceed on
Post new comment