views:

105

answers:

4

I'm looking for a simple to setup and to use solution to test the validity or health of a .net web application.

The ideal solution would allow the developers to add his important tests as functions just like In unit testing and the ui would look like any unit testing running application, but in a web pages.

Typical tests: permission properly set on directories, presence of important files, correct connection strings, etc.

Clarifications:

  • Tests must be triggered by a web page in a web browser. That web page would be called by any authorized entity, including monitoring services. This is particulary useful to detect potential problems that may occurs AFTER a successful deployment such as permission directory change or worse...

  • I'm not looking for integration or acceptance tests. It's more about application installation health.

+1  A: 

Best bet: A monitoring service. Next best bet: The package "MON" which enables you to run your own monitoring service. It periodically or on-demand fires off a series of probes (which you can define) to make sure all your infrastructure is in good working order, and complains vociferously (on your pager, if need be) if any problem is found.

Mon comes with most linux distros free, or you can look them up here:

http://freshmeat.net/projects/mon/

Ian
+2  A: 

Hi, you could use what some call Canary pages.. When you request it, it can run through the main process of your application. If anything goes wrong, it throws a 500 error, if it works fine, it'll show a blank page with a 200 status. It tests your code base, the database connectivity and any environmental problems that might occur.

The name canary page comes from the canary in a coal mine thing.

clocKwize
+1  A: 

Not sure if this will suit your requirements 100%, but could you perhaps use something like WatiN?

You write a test using WatiN the exact same way as you would any other unit test, but instead of testing some specific piece of code, WatiN will fire up an instance of Internet Explorer (or Firefox, it might also support Chrome in the future) and perform whatever action you want it to.

That way you can test pretty much anything you would normally test manually by browsing your page (such as login, assert that you get/don't get access to certain pages with the used credentials, verify that you get correct error messages when doing wrong stuff etc). At first it might take some time to write the tests, but after a bit of practice (and good structure/abstraction of your test code), it quite nice really.

Nailuj
A: 

I have not been able to test it (yet), but this article looks just like what you are looking for: Website diagnostics page to diagnose your ASP.NET website.

Mac