Friday, October 24, 2008

Web Test Timeout Setting

Web tests can be set to fail if the execution time exceeds the timeout setting. This is in the Local.Testrun settings under Test Timeouts and it's defaulted to 30 minutes. There's also a setting called "Abort a test run if total execution time exceeds"

Tuesday, October 21, 2008

Can't run Watir tests "The RPC server is unavailable"

The error happens when you close the browser. I tried running my scripts, but nothing happened. There were also two browser windows open. Fixed it by changing the IE security settings, at least on my machine. The Watir scripts worked under a different Windows User, so I figured it had to do with security. Add the server name under Internet Options> Securiry> Trusted Sites list.

Tuesday, October 7, 2008

Parameterize Web Server and ReturnUrl

Changing the web server in a web test: I have a web test with the web server name as parameter and tried changing the address under the WebServer context parameter. I changed it from http://localhost: to http://server, but got an error when I ran the test. The error message was "Response URL Validation The value of the ExpectedResponseUrl property 'http://server/site/Default.aspx' does not equal the actual response URL 'http://server/Default.aspx'. QueryString parameters were ignored." It failed because the site name was mapped to the port number in the virtual directory on localhost. I had to change the value of the ReturnUrl QueryStringParameter from %2fDefault.aspx to %2fsite/Default.aspx.

I need to remember to change the site name in 2 places:
  1. WebServer1 ContextParameter at the bottom of the webtest
  2. ReturnUrl QueryStringParameter at the top under the login step

Thursday, October 2, 2008

Integrated Windows Authentication in Firefox

I couldn't figure out why Firefox was prompting for login, but IE was not. The web application uses NTLM authentication. I found out there's a browser setting under about:config called network.automatic-ntlm-auth.trusted-uris. It accepts comma and space separated list of server names that will use integrated Windows authentication. (webserver1, test2, svr3). Now I don't have to re-enter my username & password.