Saturday, November 3, 2007

Visual Studio 2005 Team Edition Web Test

Recently I have become very interested in Visual Studio 2005 Team Edition's Web Test testing feature. I'm a firm believer in unit testing and we use them heavily at work. However, for front end testing we've always relied on hand testing. There are regression tests with go with every release, but unfortunately for us due to the size of the system only a random portion of those tests are ran for each release.

We've been interested in automated front end testing tools for a long time. I thought the Web Test would be perfect for what we were looking for. Unfortunately this is not my current top priority and only a small amount of time has been spent researching how to use the tool, but so far no go!

We use forms authentication for our application. I'm able to record a basic test which involves logging in to the application, but when the test is played back it doesn't work! The user is never authenticated. I verified the user name and password in the coded test. Everything looks right, yet it doesn't work! The fun part of it is that after logging in the test is supposed to go to a new page in the system, but since the user has not been authenticated the system returns a page stating that the user is not authorized to access the page. The built in test checks call that a success! It passes the test because it received a 200 response. I know I can add my own validation, but I thought it would have at least checked the URL to see if it matched the recording.

So while I was able to find walk through documentation from Microsoft nothing explained forms authentication. Does anyone reading this have experience testing forms authentication applications? I thought it was just supposed to pass the user/password to the form and be done with it. Is there something I'm missing.

On the plus side I am looking forward to the web test enhancements which are built in to Visual Studio 2008. I'm actually pretty exited about the pending release. I believe it should be available any day to MSDN subscribers. I enjoy feeling like a kid again every time a new version of Visual Studio is being released!

If I'm able to resolve my issues reasonably soon you can rest assured a new blog post will be made describing how I resolved it. Wish me luck!

--John Chapman

1 comment:

BlackDhalia said...

John,

Did you manage to work out forms authentication? I am having the same issue....

Thanks,


Emma

Blogger Syntax Highliter