i try to develop a project. and i try using test driven development. firstly, i write test for a login page. how can i write a test for login process in login page.
Precisaly what you are trying to do? Unit testing the complete login code including FormAuthentication & Membership will just create complexity and might not be very useful.
i work on a project. and our consultant tell us to write test before writing code. Soi my first job is creting a login form. So, i need writing login pocess unit test.
operator
Member
41 Points
143 Posts
about mvc unit testing
Dec 12, 2012 02:17 PM|LINK
Hi.
i try to develop a project. and i try using test driven development. firstly, i write test for a login page. how can i write a test for login process in login page.
Thanks in advance.
CPrakash82
All-Star
18268 Points
2838 Posts
Re: about mvc unit testing
Dec 12, 2012 02:32 PM|LINK
Precisaly what you are trying to do? Unit testing the complete login code including FormAuthentication & Membership will just create complexity and might not be very useful.
operator
Member
41 Points
143 Posts
Re: about mvc unit testing
Dec 12, 2012 02:54 PM|LINK
i work on a project. and our consultant tell us to write test before writing code. Soi my first job is creting a login form. So, i need writing login pocess unit test.
Young Yang -...
All-Star
21345 Points
1818 Posts
Microsoft
Re: about mvc unit testing
Dec 19, 2012 05:29 AM|LINK
Refer to these threads: http://stackoverflow.com/questions/669175/unit-testing-asp-net-mvc-authorize-attribute-to-verify-redirect-to-login-page & http://stackoverflow.com/questions/11612608/unit-test-for-login-in-asp-net-mvc-3
Hope this helpful
Regards
Feedback to us
Develop and promote your apps in Windows Store
Sujeet Saste
Contributor
3008 Points
572 Posts
Re: about mvc unit testing
Dec 19, 2012 05:46 AM|LINK
See following link with video tutorial :
http://channel9.msdn.com/Blogs/matthijs/ASPNET-MVC-2-Basics-Introduction-by-Scott-Hanselman
Complete demonstration about Unit testing MVC
Do FEAR (Face Everything And Rise)
Please mark as Answer if my post helps you..!
My Blog