vb.net - Implement Unit Testing on a legacy web site -


I downloaded nUnit and TestDriven.net. I have a legacy web site application and I want to implement some unit tests. I created a class in the app_code folder and imported NUIIT. Framework etc ... After writing a basic exam, I can not be tested in the "Web site" application. " Error. I think the web site project is not supported. Converting into a web application is not an option at this time. I have a Visual Studio Test Edition, so I tried that path I have created a test project, wrote some tests in my test class etc. ... to find out just that I want to have sections in the epicode folder of the web site project Can not reference Can anyone give me some hint there ??? Am I doing something wrong. I am very new to TDD. I just want to do a little bit of testing on this application.

Thanks in advance, ~ CK in San Diego

For unit tests Create separate projects, especially if you are using a web site.

You should not test classes in your web site. Rather, any class you want to test unit, should not be on the web site. Instead, they should be in a class library project that is referred to by the web site.

This is another reason for not using web sites: they do not compile until they are used, so no compiled is done for testing your test project. Code version in

Web sites should be used for nothing other than simple web sites than they wanted to handle than to refine anything else. Instead use a web application project (but still keep interesting code from this project).


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -