Mladen Prajdić Blog

Blog about stuff and things and stuff. Mostly about SQL server and .Net

Nunit asp testing

Well we decided we should do some unit testing on our asp.net project. We used NUnit.Asp. i must say the thing works realy great. the whole thing is based on xml document model of the page. so accesing tags and their attribs is preety simple. the only "drawback" i could think of is that every tag you want to get has to have an id. all in all i must say the thing is quite usefull. i build some wrapper classes that we needed and we could test anything you can think of, except javascripts that executed on the client side and opening of popup windows (if anyone knows how to do this let me know). paging, sorting, input, output, how the thing looks, everything. i must say i was quite impressed. we let the thing run overnight, and it found bugs we'd have to spend quite some time finding. the few problems we had were input into a hidden filed didn't work as it has only textbox tester, but this is fixed in a new verion and  you have to know the id's for everything so autocreated controls can be a problem.

so i must say i recomend the stuf. now they even have T-SQL Nunit testing and the original NUnit for server side. Taking a look may be worthwhile.

Legacy Comments


Jay Arvin
2006-08-01
re: Nunit asp testing
Hello, I have a ASP.Net Project that requires credential when you hit the page and it is done using ISAPI. I am planning to test my project using NUnit but i don't have any idea on how should I pass the credential that the NUnit should be using when browsing the page. Can anyone help me on this?

Mladen
2006-08-01
re: Nunit asp testing
Provide the credentials the same way you do it in your code.
either by setting the querystring or a value of an input field.