470,810 Members | 1,495 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,810 developers. It's quick & easy.

Unit Testing app_code directory with Visual Studio Professional 2005

I don't have Team System, but I'd like to be able to unit test the code
in my app_code directory using nunit, or something else. Is there any
way to do this? I can't add a reference from another page, and I can't
find the dll for these classes. Thoughts?

Thanks.
-jeff

Feb 8 '06 #1
2 5548
On 7 Feb 2006 22:27:07 -0800, "jd1978" <je*********@gmail.com> wrote:
I don't have Team System, but I'd like to be able to unit test the code
in my app_code directory using nunit, or something else. Is there any
way to do this? I can't add a reference from another page, and I can't
find the dll for these classes. Thoughts?


Without using a class library project, I think you'd almost have to
put unit tests inside App_Code then use MSBuild to precompile the
application into a known directory and run NUnit against App_Code*
assemblies.

Another option is to use WDP [1], which is a collection of custom
MSBuild tasks for ASP.NET. You can precompile and merge all the
dynamic assemblies into a single .dll. Your NUnit project can
establish a project reference to the WDP project, so the unit tests
can live in a different assembly (which is preferable, IMHO).
[1]
http://msdn.microsoft.com/asp.net/re...p/default.aspx

--
Scott
http://www.OdeToCode.com/blogs/scott/

Feb 8 '06 #2
Thank you Scott, I think I'll go the separate project route. I just
thought I'd see if there was a simple other option. Appreciate the
input.
-Jeff

Feb 8 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Edwin Yip | last post: by
reply views Thread by enrique | last post: by
15 posts views Thread by Enrique | last post: by
reply views Thread by Dunc | last post: by
9 posts views Thread by rn5a | last post: by
8 posts views Thread by WT | last post: by
2 posts views Thread by mo.sparrow | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.