woensdag 12 maart 2008

Released WatiN 2.0 CTP

Update: These code samples will no longer work as off WatiN 2.0 beta 1 and higher

I just released WatiN 2.0 Community Technology Preview! So start automation IE and/or FireFox with WatiN as of today. Read how to get started and download the release here. Be aware that the API can (and there for will) change till the final 2.0 release. Here is an example:

public void SearchForWatiNOnGoogleVerbose()
    using (IBrowser ie = BrowserFactory.Create(BrowserType.InternetExplorer))
        ie.TextField(Find.ByName("q")).Value = "WatiN";

    using (IBrowser firefox = BrowserFactory.Create(BrowserType.FireFox))
        firefox.TextField(Find.ByName("q")).Value = "WatiN";

A big thanks to Edward Wilde for all the work he has done on integrating FireFox in WatiN! And of course we like to hear what you think of it.

Have fun

Tags van Technorati:

woensdag 5 maart 2008

Agile development and WatiN

Because I'm interested in what people say about WatiN I look around at Technorati (http://technorati.com) from time to time. From there I picked up this great article about Agile development and WatiN. I think Rainer and Karin has put to gather a very nice article! Thanks guys! Have a look at how they use Visual Studio 2008, Linq-To-Sql and WatiN at http://www.software-architects.com/TechnicalArticles/TestDrivenDevelopment/tabid/83/language/en-US/Default.aspx

Strange thing is that I implemented somewhat in the same way our example application for our presentation at Agile Egypt. I don't have any article going with it but if you are interested you can download the example code (http://www.agileegypt.com/presentations_March2008/Agile%20Lab%20code.zip) and our presentation (http://www.agileegypt.com/presentations_March2008/Agile%20Lab.pdf) from the agile egypt site (www.AgileEgypt.com).

The purpose of our presentation was to show people a small agile development project using Test Driven/First Development. So we went through the creation of a web site to sign up for a course:

Iteration 0: Setting up source control and continues integration

Iteration 1: A very basic implementation of a list of courses

Iteration 2: TDDing our way through our tasks for creating a sign up page for a course.

In our presentation we used :

  • Visual Studio 2008 with Linq. I love the new Linq syntax and the extensions methods it adds to types implementing IEnumerable.
  • ASP.Net MVC Toolkit (http://www.asp.net/downloads/3.5-extensions/). After playing with it a bit I knew immediately that I didn't want to  go back developing in webforms..... But reality is different.
  • WatiN (http://watin.sourceforge.net). Need I say more :-)
  • NUnit 2.4 (http://www.nunit.org/). Because we are familiar with it and (still) like it. Especially the Assert.That() syntax is sweet.
  • LightORM (http://www.codeproject.com/KB/database/LightORMLibrary.aspx), an open source API to persists your classes to a database. We choose this because we wanted to show the audience that it is possible to start without having to setup a database before you start coding, the Test Driven Development way of doing things (yes we went very pure on this).
  • NAnt (http://nant.sourceforge.net/). Mainly because we aren't familiar with MS Build and NAnt has served us great in the past and probably will in the future.
  • Hudson (https://hudson.dev.java.net/) for continues integration. It is a JAVA application and really simple to setup for continues integration. Just kick of the build.bat file from Hudson, which will kick of the NAnt build and you have your CI running.
  • And last but not least we used SubVersion (http://subversion.tigris.org/) and TortoiseSVN (http://tortoisesvn.tigris.org/) as our source control system.

Have a look at the code and let my know what you think of it. And don't forget to install the ASP.NET MVC Toolkit release from last December before firing up the code in Visual Studio. There is also a build.bat file to kick off the (automated) build.

Tags van Technorati: