You are a user (Domain A\Ray) in domain A. If you use VSTS 2008 web test to test the URL in domain B, IE 7 will have the Windows Authentication login popup to remind you of entering the username (Domain B\Ray) and password in domain B. You will see the login popup as follows:
The server XXX.XXX.com at XXX.XXX.com requires a username and password.
After you enter your username and password, the web test moves on and finally makes your test fail. When you see the test result, you find one of the requests is: You are not authorized to view this page.
After you generate the codes and find that VSTS 2008 doesn’t record the username and password you just entered. How can you handle this situation?
You need to add the following source codes.
this.UserName = "abc\raylin";
this.Password = “12345”;
After you add them and if the test case still fails, please check if you install VSTS 2008 SP1. You might also need to add the proxy in your source codes too. You will make your test case pass.