Montu564119

We are automating test cases for a website using VSTS.
We are facing a problem in running webtest. There is dynamically generated Login page (default.aspx) in this website (The page is coded in ASP.NET using C#). The functionality expected is: When logged in succesfully the same page should display some menu items and login frame on the page should disappear.
We recorded this scenario in a webtest using VSTS. But when trying to run this webtest, even after providing correct login credentials, same page is displayed with login frame still appearing (i.e. user is not logged in) . We can not figure out what makes the webtest behave this way. Whereas when run the same website in a browser it works fine.
It will be great if you can please help us in this scenario.




Re: Visual Studio Team System - Web and Load Testing Problem in Webtest using ASP.NET page postback

slumley MSFT

Can you take a look at this link to see if it helps in debugging your script:

http://blogs.msdn.com/slumley/pages/how-to-debug-a-web-test.aspx






Re: Visual Studio Team System - Web and Load Testing Problem in Webtest using ASP.NET page postback


Re: Visual Studio Team System - Web and Load Testing Problem in Webtest using ASP.NET page postback

Montu

The scenario is: when I record the webtest using http://www.<name>.com and replay the test, it works fine.
If I record the test as using url http://<name>.com and replay the test, user is not successfully authenticated. The control is redirected to login screen again.
Website is using form authentication and also it is secured site.
Can anybody help me getting over this problem




Re: Visual Studio Team System - Web and Load Testing Problem in Webtest using ASP.NET page postback

Michael Taute - MSFT

If authentication is done via cookies - Then cookies are based on domain.

It's possible your cookie is getting written for www.<name>.com (even though you navigated to <name>.com.

Then, when your browser is going to a page that requires authentication, it won't pass along your authentication cookie because <name>.com is not within www.<name>.com

Try taking a look at what cookies are getting set from your authentication page response and whether they're being passed to the next page or not.

--Mike