A strange fix for “ADO.Net session has expired”

Recently we were conducting a Performance lab for a Web based reporting service. After recording a Web test we would get this Nasty “ADO.Net session has expired” error just after the recording is over and while Visual Studio is detecting Dynamic parameters. The reason for this error could be many… like the ones mentioned in the links this, this and  this.

Then we found an article that mentioned how “Promoting Dynamic Variables” could solve this issue (link). So we right-clicked the Web Recording and clicked “Promote Dynamic Variables”. But nothing happened. No dynamic variables were detected.

So we continued our research. And one of the nasty errors I was getting on my terminal was this:



This error used to show up everytime we started the Web Recorder from VSTS. Intially we ignored it and manually started the Web Recorder from the View\Explorer Bar menu option of the browser. But I decided to get rid of it by setting the following option in the Browser:


And, to our surprise, after setting this option, the Promote Dynamic Variables list box showed up. So, my guess… because VSTS could not instantiate the Recorder itself, it failed to put the required “hooks” to detect Dynamic Variables after the recording was over.

So, after a day of struggle with the nasty session error, we were finally able to record all our scripts. As they say… Alls well that ends well.

Setting up Agent and Controller on the same machine with VSTT 2008

If you have only one multi-proc machine to generate user load on your application, you can set up the Agent and the Controller to be the same machine. Just one little tip; when assigning a test to a an agent, don’t select the “local” radio button. Picking this option will select VSTestHost.exe to run the test which in turn will use only one processor (ref: Generating heavy loads in VSTT 2008: What has changed?)

So, on the Agent Configuration screen, choose Remote and then assign “localhost” as the agent. This configuration will use QTAgent.exe and hence use multiple procs to simulate higher loads.

Generating heavy loads in VSTT 2008: What has changed?

In my previous post, Generating heavy loads using Visual Studio Team System for Testers 2005, I explained how the the GC configuration can be changed for generating heavy loads on Multi-proc machines.

For Visual Studio Team Suit 2008 for Testers , there is a change. VSTestHost.exe is now hardcoded to use only one CPU. Which means, even if you change the GC settings in the config file, it will be overridden with hardcoded Workstation GC settings.

To generate heavy loads using VSTT 2008, you have to use the Agent/Controller setup. Once the Agent/Controler has been configured, change the Server GC settings in QTAgent.exe.config on the Agent machine and you will be good to go.