Category Archives: testing

Roy Osherove is giving an hands-on TDD Masterclass in the UK, September 21-25

Roy Osherove is giving an hands-on TDD Masterclass in the UK, September 21-25. Roy is author of “The Art of Unit Testing” (http://www.artofunittesting.com/), a leading tdd & unit testing book; he maintains a blog at http://iserializable.com (which amoung other things has critiqued tests written by Microsoft for asp.net MVC – check out the testreviews category) and has recently been on the Scott Hanselman podcast (http://bit.ly/psgYO) where he educated Scott on best practices in Unit Testing techniques. For a further insight into Roy’s style, be sure to also check out Roy’s talk at the recent Norwegian Developer’s Conference (http://bit.ly/NuJVa).

Full Details here: http://bbits.co.uk/tddmasterclass

bbits are holding a raffle for a free ticket for the event. To be eligible to win the ticket (worth £2395!) you MUST paste this text, including all links, into your blog and email Ian@bbits.co.uk with the url to the blog entry.  The draw will be made on September 1st and the winner informed by email and on bbits.co.uk/blog

Tagged

WatiN supports Firefox!

Back in March I finished developing a release of the WatiN framework that enabled testing in Firefox in addition Internet Explorer (already supported). This was the first time I’ve been involved in collaborative open source development. I worked with Jeroen van Menen, the creator of the WatiN project using Basecamp for project management and sourceforge svn for source control. It was also my first time using Basecamp which worked out pretty well for us. It’s simplicity is what I like. You basically just manage a bunch of grouped lists:

WindowClipping (11)

WindowClipping (12)

Anyhow… It’s now pretty straight forward to make a unit test execute under both IE and firefox

[Test] public void SearchForWatiNOnGoogleVerbose() { using (IBrowser ie = BrowserFactory.Create(BrowserType.InternetExplorer)) { ie.GoTo("http://www.google.com"); ie.TextField(Find.ByName("q")).Value = "WatiN"; ie.Button(Find.ByName("btnG")).Click(); Assert.IsTrue(ie.ContainsText("WatiN")); } using (IBrowser firefox = BrowserFactory.Create(BrowserType.FireFox)) { firefox.GoTo("http://www.google.com"); firefox.TextField(Find.ByName("q")).Value = "WatiN"; firefox.Button(Find.ByName("btnG")).Click(); Assert.IsTrue(firefox.ContainsText("WatiN")); } }

It’s also quite trivial to collapse these two using constructs into a single chunk of code for better maintainability etc..

Check out the WatiN Firefox Community Technology Preview for more information.

Tagged , ,