.NET Forum / Visual Studio.NET / Enterprise Tools / February 2007
Running Recorded VS2005 Team Edition for Testers Web Test
|
|
Thread rating:  |
Mike Logan - 30 Jan 2007 14:30 GMT I am able to record a simple session (like getting the home page of Microsoft.com), but when I run the test, I get the following message:
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at Microsoft.VisualStudio.TestTools.WebStress.WebTestTransaction.ResponseReceived(IAsyncResult result)
If I record and run a test of an internal server (internal to our network), it works fine. The only time it doesn't work is if one of the pages uses an image from another website (external to our network). Once I hit one of those pages in my script, I pretty much lock up. I'm assuming there's a place where I haven't put in the proxy information correctly, but I can't find it. There doesn't appear to be loads of documentation on this product (or articles for that matter), but I'd appreciate any help that can be provided.
Thanks!
 Signature Mike Logan
WenYuan Wang - 31 Jan 2007 12:11 GMT Hi Mike,
According to your description, I understand that your web test project can not access external network. If I misunderstand anything here, please don't hesitate to correct me.
I think the root cause of this issue is the proxy setting. I have created an webtest project, and noticed there is a proxy setting in the property windows when you selected the webtest project. We suggest you check this proxy information. Please feel free to let me know whether or not this works for you.
Sincerely, Wen Yuan
Mike Logan - 31 Jan 2007 17:22 GMT Yes,
I have tried that, but keep getting a "407: Proxy Authentication Required" error message. I have not found a way to pass my credentials to ISA for the outbound proxy call. Can you tell me whether this is supported in VS2005 for Testers? It is used in the recording of the session (through IE), but I guess it's not captured by the test for playback. I have tried putting my userid and password in the properties of the WebTest, but I believe that is credentials for the application, not the proxy, as I am still having the same error regardless of what I put in there. Thanks,
 Signature Mike Logan
> Hi Mike, > [quoted text clipped - 10 lines] > Sincerely, > Wen Yuan WenYuan Wang - 01 Feb 2007 13:07 GMT Hi Mike. Thanks for your reply.
Base on my test, I'm afraid there is no option we can input user credentials for proxy into. I noticed that there is a post related to this issue. Somebody said the only way to resolve this issue is using Windows default credentials. I think I need perform more research on it and I will reply you tomorrow. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=944406&SiteID=1
Thanks very much for you understanding. Best regards, Wen Yuan
WenYuan Wang - 02 Feb 2007 07:55 GMT Hi Mike,
Thanks for waiting.
I'm really sorry to say that I'm afraid it is not possible for us to pass user credential for proxy. If we want to run webtest project through ISA, we should have to use Windows default credential. There is no option which we can use for credential. I think it is not supported in VS2005 for Testers. Please feel free to reply me if there is anything we can help with. I'm very glad to work with you.
Thanks for your understanding again. Best regards, Wen Yuan
Mike Logan - 02 Feb 2007 15:30 GMT Where do you supply the Windows Default Credentials
Thanks,
 Signature Mike Logan
> Hi Mike, > [quoted text clipped - 10 lines] > Best regards, > Wen Yuan WenYuan Wang - 05 Feb 2007 07:13 GMT Hi Mike, Thanks for your reply.
Proxy Credentials can only be specified in a coded web test, and this capability is not available in normal web tests. You can following the steps as below to supply the windows default credentials. 1. Right click your webtest project and click Generate Code. 2. Add the following code into the "Run" method. NetworkCredential credential; credential = (NetworkCredential)CredentialCache.DefaultCredentials; WebProxy proxy = new WebProxy("XX.XX.XX.XX", 80); proxy.Credentials = credential; this.WebProxy = proxy;
Reference: http://msdn2.microsoft.com/en-us/library/ms182550(VS.80).aspx [How to: Create a Coded Web Test]
Please try the method as above and let me know whether or not this works for you. I'm glad to assist you. Hope this helps, Best regards, Wen Yuan
WenYuan Wang - 07 Feb 2007 04:11 GMT Hi Mike,
I haven't heard from two days. I just want to check if the issue has been resolved. If it still persists, please don't hesitate to update here. We'll go on to assist you on it. Thanks.
Have a great day! Best regards, Wen Yuan
Mike Logan - 07 Feb 2007 18:21 GMT It works, thank you.
 Signature Mike Logan
> Hi Mike, > [quoted text clipped - 6 lines] > Best regards, > Wen Yuan WenYuan Wang - 08 Feb 2007 03:58 GMT You are welcome, Mike.:)
Have a great day. Sincerely, Wen Yuan
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|