November 2, 2006

WatiN and WatiNFixture

I'm sure some of you will have heard of WatiR (Web application testing in Ruby).

We'll I've recently discovered a .NET offshoot of the same (called WatiN), which suits:

  • my limited programming ability by virtue of being C# scripted (although any .NET language will work).

  • my .NET FitNesse environment


I've played around somewhat with using WatiN browser automation via VS2005 unit tests, and this works really well.
I also tried calling it via FitNesse through ActionFixtures and the like. It was cool, but a little heavy on reliance on the fixture programming.

Anyway in trawling the FitNesse forums ( http://tech.groups.yahoo.com/group/fitnesse/ ), I stumbled across Jeff Parker's work on a dedicated FitNesse Fixture for WatiN automation, (un-surprisingly called WatiNFixture). This allows you to create an IE instance and control the actions and validation is a key-word manner. I hit him up for the code but it was getting some polishing and was likely to come out with WatiN 9.0 :-(

WatiN release 9.0 was put out yesterday (here) sans WatiNFixture. Things are really coming together, though - Frame / iFrame support and Dialog Box handling is all in this release. WatinFixture 0.1 also launched yesterday (here) so it looks like they're collaborating rather than integrating at this stage.

Anyway if you're into test / IE automation and Fit or FitNesse check them out.

October 6, 2006

FitNesse and Data Conversion

I blogged quite some time ago about some data conversion testing I was doing. The customer has a freaky proto-database made up of hundereds of separate MS Excel worksheets and frequently running into the old Excel maximum row count limit. We're doing the sensible thing and getting it into a relational DB (in this case MSSQL 2005). Dont ask me how they managed up until now.

I'm way overdue for an update on this, so here we go:

I ended up working mostly with FitNesse and SQL stored procedures.

I absolutely love FitNesse. For those of you who dont know it, FitNesse is based on Fit - a tool for writing and executing 'story tests' that both describe the desired behaviour of the system (requirements) and validate that the behaviour is achieved. FitNesse is a wiki based platform for writing and running these Fit tests. You can read more about it here.

I had (the .NET 2.0 variant of) Fitnesse executing stored procedures retrieving data for given set of parameters, and checking that the result sets matched. The tests can involve many assertions, and they can be organised into Suites covering logical areas and suites of suites - covering pretty much the whole system.

Given that there is absolutely masses of data (and conversion rules) I wanted to automate as much of these tests as possible, this meant I could keep working through the spec (chasing the dev) but every time I ran a test, I'd re-run ALL the old ones. Thing would break way back quite regularly. Once we got to feature complete, we just satrting doing bugfixes, and turning red tests into green ones.

At this point (near the end I'm hoping) I have 2300 odd tests running with every migration pass. Of course I could have had some big arsed SQL scripts going and doing the same thing, but for me the beauty of the FitNesse tool is the following two points:

Reporting - The outcome of the test runs is very obvious ( green / red colour coded to the test and assertion that has failed)

Maintainability - The tests themselves (including the expected results) are easily editable.

Oh ... and as they're "self documenting" pretty much circumvent writing test cases in Word.

Im sold on it.

Now I'm looking at getting some browser automation going with FitNesse. I'm looking at WatiN ( an I.E. automation framework like the Ruby WATIR framework, but for .NET ). More on this later.

August 18, 2006

A disclaimer

Jerms is about to circulate a list of Intergen bloggers.

It's probably appropriate that I say at this point that this blog is probably never going to be the central authority on Test Tools, Microsoft Test Tools or even Piers' dodgy hacked test tools.

Even if I wanted it to be.

I use it for collecting ideas and saving them where I can get at them later.

...you may or may not be interested in going through my junk.

February 14, 2006

The MSFT Web / Load Test Gurus

Before I forget, here are the blogs for the Microsoft gurus on the VS2005 tester toolset
Josh Christie - Bill Barnett and Ed Glas.

Also:


Sean Lumley and


Team blog

January 17, 2006

MAF conversion - update 1

So the MAF stuff:

At the moment the system puts some data in to a database, and writes to an error log where it finds any issues. I haven't looked at the relationships in the target system or even the data quantity yet, but first things first....

I scrounged this stored proc, which will count the number of rows in each table after the migration run has occured. At present these are stored in a temporary table and the results just written to the SQL Query analyser, but I'm looking to keep a record of these (outside the database itself - so as not to change the beast I'm checking).

I stumbled across the bcp utility and the xp_cmdshell proc, which will let me write the results out to a text file of my choice - still feels a little inelegant, but I think it'll do for now.