Exception in PreRequest event: The hidden field group name is invalid

Build: 8.0.50215.44 (beta2.050215-4400)

Repro:

1.) Record a web test
2.) Play it back
3.) [Do not generate code or implement anything in the PreRequestEvent]

Results

Exception on GET/POST requests (no pattern) even though HTTP response shows 200 (OK) or 302 (FOUND) on same URL requests as exception is thrown on. The HTTP response <body> for requests that raise the exception is always "Object Moved".

Strangely, most of my recorded tests play back flawlessly. I checked, and none of my requests are set to use a proxy server (testing on an internal NTFS domain web server running IIS 6 / ASP.NET 1.1).

Stack Trace Excerpt:

Microsoft.VisualStudio.QualityTools.WebStress.PreRequestException: Exception in PreRequest event: The hidden field group name is invalid. > System.ArgumentException: The hidden field group name is invalid.
at Microsoft.VisualStudio.QualityTools.WebTestFramework.BindHiddenFields.PreRequest

When generating code for the recorded test and monitoring [this.PreRequest.Target.HiddenFieldGroup (string)] in the debugger, I see it's set to "null" and BindToQueryString = "false".
TIA,

Terry

[1155 byte] By [TerryAnderson] at [2007-12-16]
# 1
Terry,
This is a bug that has been fixed in the post-Beta2 CTP releases. We no longer use a PreRequest event to do hidden field binding. Now, hidden field binding shows up as normal parameters in the web test that are bound to context variables like $Hidden1.__VIEWSTATE.

In the newer releases, you could still run into errors like "$Hidden1.__VIEWSTATE was not found in the context". If you see this sort of error, that generally indicates that the web app did a javascript redirect during recording that we didn't capture into the web test. This will need to be manually corrected, but should occur much less frequently than the error you're seeing now.

I'd recommend upgrading to the newest CTP soon since it includes MANY other improvements and bug fixes, too.

Josh

JoshChristieMSFT at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...

Visual Studio Team System

Site Classified