...I should probably explain this a bit more!...
We use NUnit to control our tests - we determine failure by surrounding each test in a try/catch block. I would like to send out an email notification upon failure. We could add some code to our tear downs to send an email if the test has failed. We would have to remember to add this bit of logic to each of our teardowns though.
The advantages I see of having an event fired upon failure is -
>Say we have a validate.exists within a code module/helper method such as "Login()"...if a 'failure' event was fired here (with stacktrace details) which invokes a method (our handler) that sends an email, then we would get an email to say failure has occurred at 'Login' and not just that test x has failed.
>We could log failures to our DB for each validate, again with the class/member details...this would allow us to report on failing areas such as 'Login', instead of just being able to see failures at test level. We could quickly see 10 tests have failed but 10 'Login's have failed and therefore identify that there is a login issue.
>If we have a test which has several validates wrapped in a try/catch because we want it to try all steps, then we would get an email notification for each of the failure points, not just one big failure at the end of the test.
In general, it would just be a nice little feature which would open up some powerful opportunities...
I hope that makes sense
Sorry for hijacking this thread...all seems relevant though
