InfoQ

News

Tutorial: TDD with Selenium and Castle

Posted by James Vastbinder on Feb 20, 2007 01:16 PM

Community
.NET,
Agile
Topics
Unit Testing,
Agile Techniques
Tags
Selenium,
Castle,
TDD,
Testing

In this InfoQ tutorial Dan Bunea shows developers how TDD can be applied in .NET using Selenium RC and Castle. Selenium is an automated test harness for building enterprise class web user interafaces written in any programming language.  Castle is an open source project dedicated to providing libraries to ease the enterprise application development process for .NET based applications.

Test first principals provide architects a way to quickly jump into active development early in the application development lifecycle.  Design of the application takes place as development occurs and obviates the need to design the application before the actual coding process begins.  This provides the architect with flexibility to respond to new and changing requirements as the application lifecycle evolves.

The benefits of TDD are a drastic reduction in defects as well as increased adaptability in the code base since the application advances quickly through an iterative process.  For each iteration developers must first create the tests their code must pass before they write any actual code. The iteration finishes with a period of refactoring dedicated to simplicity and flexibility.  Adherents claim TDD is a code tempering process allowing them more time to program and concentrate on writing quality applications.

What have been your experiences with TDD?

Related Sponsor

VersionOne is recognized by Agile practitioners as the leader in Agile project management tools. Companies such as Adobe, BBC, CNN, Dow, HP, IBM, Sony and 3M have turned to VersionOne to help deliver greater value to their customers.

5 comments

Reply

TDD by Thamaraiselvan Poomalai Posted Feb 21, 2007 12:03 AM
Re: TDD by Deepa Jain Posted Jun 15, 2007 7:08 AM
Firefox and HTTPS plug-in problems? by Frank Cohen Posted Feb 21, 2007 4:14 PM
Re: Firefox and HTTPS plug-in problems? by Patrick Lightbody Posted Mar 14, 2007 11:02 PM
Great tutorial but source code link's broken by Stefan Marev Posted Apr 24, 2008 4:03 AM
  1. Back to top

    TDD

    Feb 21, 2007 12:03 AM by Thamaraiselvan Poomalai

    TDD is always healthy for all projects as almost all projects deploy different version/variations of frameworks, drivers etc in production than what they started for development. Also, in typical infrastructure, there are always one after other upgrades (Service Packs, new versions, new softwares etc). TDD will reduce stress of development team to large extend in above scenarios. But all softwares are ready for TDD?, Current BPM tools are not test friendly.

  2. Back to top

    Firefox and HTTPS plug-in problems?

    Feb 21, 2007 4:14 PM by Frank Cohen

    Selenium looks like a very nice plug-in to help make test script creation easy. I maintain the TestMaker open-source SOA test automation tool and we long ago embedded a branch of the MaxQ proxy recorder to make script creation easy. Recording proxy servers work well for HTTP but require a lott of extra "stuff" to work with HTTPS. One of our users recommended we write a FireFox plug-in like Selenium and he added that Selenium was encountring problems with HTTPS too. Is there anything too that? -Frank Cohen http://www.pushtotest.com

  3. Back to top

    Re: Firefox and HTTPS plug-in problems?

    Mar 14, 2007 11:02 PM by Patrick Lightbody

    Frank, We (the Selenium guys) actually solved HTTPS a couple of months ago, but we haven't gotten off our lazy butts to put out a release. We're narrowing in on a single "mode" of Selenium RC that can handle all cross-domain and SSL traffic, becoming the one-stop shop for web testing. I'd love to chat with you some more about Selenium if you'd like. Feel free to email me at plightbo@gmail.com. Patrick

  4. Back to top

    Re: TDD

    Jun 15, 2007 7:08 AM by Deepa Jain

    Wat if I am not using .NET .Can this be done using simply HTML If Yes then plz tell me

  5. Back to top

    Great tutorial but source code link's broken

    Apr 24, 2008 4:03 AM by Stefan Marev

    Great tutorial. I know it's been a while since the article was published but the download source code link is broken.

Exclusive Content

Intentional Software - Democratizing Software Creation

Business users doing programming? Simonyi and Kolk presents how Intentional Software offers a radical new software approach that separates business knowledge from software engineering knowledge.

Getting Started with Grails

Jason Rudolph discusses Java/Grails integration, Grails plugins, creating a Grails sample application, Grails app structure, data querying and persistence, validation, controllers and tag libraries.

Creating Product Owner Success

The Scrum Product Owner role is powerful, valuable and challenging to implement. It brings healthier relationships between customers and developers, and competitive advantage - if you do it right.

Book Excerpt and Interview: Effective Java, Second Edition

Effective Java, Second Edition by Joshua Bloch is an updated version of the classic first edition, which won a 2001 Jolt Award. InfoQ asked Bloch questions about the areas that the new edition covers.

Tapestry for Nonbelievers

A new article by I. Drobiazko and R. Zubairov introduces v. 5 of the Apache Tapestry component-oriented web framework. The tutorial shows how to create a component and covers IoC in Tapestry and Ajax.

Pete Lacey on REST and Web Services

In this interview, Burton Group consultant Pete Lacey talks to Stefan Tilkov about his disillusionment with SOAP, his opinion on REST, and addresses some of the perceived shortcomings REST vs. WS-*.

Business Natural Languages Development in Ruby

Jay Fields presents his concept of Business Natural Languages - a type of Domain Specific Languages geared towards being readable by domain experts.

Distributed Version Control Systems: A Not-So-Quick Guide Through

Adoption and interest for Distributed Version Control Systems is constantly rising. We will introduce the concept of DVCS and have a look at 3 actors in the area: git, Mercurial and Bazaar.