InfoQ

News

Tutorial: TDD with Selenium and Castle

Posted by James Vastbinder on Feb 20, 2007

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

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.

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
    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.

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.