You might also want to look at WatIn for testing web apps.
I have written a wrapper application that allows us to script a test using an xml file as input (it contains "instructions" to WatIn, telling it what URL to got to, which controls to click, type text into, check the value of etc.).
I found this much more flexible than the standard approach where the test was "pure" c# code. For example, once I had the steps written to lodge an application for membership through our web app, I just used a perl script to read the xml and duplicate it 500 times using different names, addresses, etc. Voila - a test script that creates and lodges 500 unique membership applications.
When a test or step fails, the wrapper writes information to a log file, which is a html format file with links to the actual step in the script, the page source the failure occurred in, etc.
It would be a trivial task to hook this error reporting into OnTime using the SDK, so failures were recorded in OnTime as a defect automatically.
BTW - WatIn is free and you get the source code :-)