20 August 2006

TDD Mono asp.net web application on

Note: (This is a dump as I play with the new tools on doing familiar TDD aka. Test Driven Development), work in progress.

The application:
An asp.net web application run on Linux Mono

Requirement: Unit test web application UI.

This is hard. NUNIT is designed for API (exe, lib) test

Unit test server controls

Support Continuous integration

Tools for the trade:

- VS.net IDE

- NUnit (For this project we targeting asp.net 1.1, so pick NUnit 2.2 from the list)

- Nant

- Ruby

- WATIR (I use watir-1.4.1.exe as at the time of writing)

- Mono gtk, XSP web server

Internal Resource:

- Ruby test code template for vs.net

- Water code template for vs.net (because I am lazy)


Babysteps in WATIR A Jumpstart to Ruby/Watir

Integrated ASP.NET Web Application Testing with NUnit, Ruby, and Watir Travis Illig creates a RubyTestExecutor to integrate Ruby/Watir Testscripts into nUnit framework. So test cases can be run from GUI like other nUnit test cases. However this is more of convenience that necessary. You still write Ruby/Watir scripts. You can still invoke them from command line.

Introduction to Mono - Your first Mono app Happened to find this Primer

Development pattern:

Assumption: Coding in vs.net 2003, OS: winXP

(One off task) Create web project

  1. create project directory: {root}\My.Hello.World
  2. Web share this folder
  3. create a new web project in vs.net, map it to My.Hello.World
  4. Execute Mono run time test. Bring up command line console and do nAnt build.
    a. Start Mono XSP web server
    b. nAnt target doesn't natively require nUnit, although it could leverage point 1-3.
    c. However, this is redundant. We can just load up Ruby and Watir script engines and call test scripts

No comments: