Error : Exception has been thrown by the target of an invocation  
Author Message
R.J.





PostPosted: Visual Studio Team System - Web and Load Testing, Error : Exception has been thrown by the target of an invocation Top

I have recorded web test and when I try to run the test it throws error that "Test could not be run because of the following exception: Exception has been thrown by the target of an invocation".< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Any suggestions..



Visual Studio Team System15  
 
 
slumley MSFT





PostPosted: Visual Studio Team System - Web and Load Testing, Error : Exception has been thrown by the target of an invocation Top

So immediately after you recorded the test, you tried to play it back and this happened   Did you modify the recording in any way

 
 
R.J.





PostPosted: Visual Studio Team System - Web and Load Testing, Error : Exception has been thrown by the target of an invocation Top

Thanks for your response. I have not modified any thing. Just recorded and play and also recorded other web test in different projects and face the same problem.< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

As we have to start perf testing for our application. I am little worried what is the cause.


 
 
slumley MSFT





PostPosted: Visual Studio Team System - Web and Load Testing, Error : Exception has been thrown by the target of an invocation Top

We can turn on logging for the process that is executing tests to see if gives any additional info.  Try the following:

 

1) Open the VSTestHost.exe.config.   This is located in "\Program Files\Microsoft Visual Studio 8\Common7\IDE"

2) Paste the following xml in the file:

<system.diagnostics>
    <trace autoflush="true" indentsize="4">
        <listeners>
           <add name="myListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\VSTestHost.log" />
        </listeners>
    </trace>
    <switches>
        <!-- You must use integral values for "value".  Use 0 for off, 1 for
             error, 2 for warn, 3 for info, and 4 for verbose. -->
        <add name="EqtTraceLevel" value="4" />
    </switches>
  </system.diagnostics>

3) Save file and run test

This will create a log file called VSTestHost.log on the Cdrive.  You can change this by modifying the initializeDate Attribute above.  Please run test and look for errors in the log. 

One other quesition.  Which version of the product are you using



 
 
cdwm





PostPosted: Visual Studio Team System - Web and Load Testing, Error : Exception has been thrown by the target of an invocation Top

When I add the above XML snippit to VSTestHost.exe.config, the log file produced by this and by running my load tests contains lots of the following messages.

[E, 628, 42, 2006/10/17 15:30:39.687 7764304442993] vstesthost.exe: WebLoadTestAdapter: Exception initializing WebTestRequestResult: System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.VisualStudio.TestTools.WebStress.WebTestRequestResult.Initialize(WebTestInstrumentedTransaction transaction)

Addtionally, the test quits after about 28 minutes.

Can you give me information on what this error means



 
 
magoria





PostPosted: Visual Studio Team System - Web and Load Testing, Error : Exception has been thrown by the target of an invocation Top

i have same problem , when i try to execute recorded web test , same error generates, is any one knows how am i solve this problem

Thanks&Regards

Kenan



 
 
Ed Glas - MSFT





PostPosted: Visual Studio Team System - Web and Load Testing, Error : Exception has been thrown by the target of an invocation Top

Are you running SP1 If not I recommend you install SP1 and retry record and playback.

Ed.



 
 
Ed Glas - MSFT





PostPosted: Visual Studio Team System - Web and Load Testing, Error : Exception has been thrown by the target of an invocation Top

Note your web test constructor may be throwing an error in this case. We recently found a bug in Orcas testing where the inner exception was getting eaten, and only this outer exception reported.

Ed.