locked
Looking for an example of AspNet Unit test of Login.aspx RRS feed

  • Question

  • I am looking for two examples that I expected to be easy to locate, but they appear to not exist..

    • Assuming that Login.aspx has the standard Login Control, an example to validate that some login works and others do not.
    • Assuming that the web application requires a login, an example of logging in and then move to some page and click a button on that page.

    This is assuming a AspNet 4.0 Web Application (not Web Site).

    Keywords: AspNetDevelopmentServer UrlToTest

    Many thanks in advance!


    The Lasse

    Monday, September 23, 2013 11:44 PM

Answers

  • Hi Ken,

    The unit test is used to test the class methods. As you said that if you want to test the login.aspx with a login control, maybe the coded UI test is what you want to get. You could also create a coded UI test with specified data, for example, the username and the password for the log-in page.

    http://msdn.microsoft.com/en-us/library/dd286681(v=vs.100).aspx

    http://msdn.microsoft.com/en-us/library/ee624082.aspx

    Best Regards,


    Jack Zhai[MSFT]
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, September 25, 2013 6:28 AM