views:

257

answers:

1

I created a new test project with web tests as described in Microsoft's documentation here. However, when I try to run a web test, even if it's just a blank test, I get the following error:

Request failed: Could not run Web test 'WebTest1' on agent 'MYCOMPUTER': Method not found: 'Void Microsoft.VisualStudio.TestTools.WebTesting.WebTestContext..ctor(System.Collections.Generic.Dictionary`2, Int32, System.String, System.String, Int32, Int32, Microsoft.VisualStudio.TestTools.WebTesting.ValidationLevel)'.

at Microsoft.VisualStudio.TestTools.WebStress.WebTestCaseContext..ctor(WebTestCaseVariation variation, Int32 webTestIteration, Hashtable runContextParameters) at Microsoft.VisualStudio.TestTools.WebStress.WebTestCaseVariation..ctor(WebTestElement webTestElement, Hashtable runContextParameters) at Microsoft.VisualStudio.TestTools.WebStress.WebTestElement.CreateVariation(IRunContext runContext) at Microsoft.VisualStudio.TestTools.WebStress.WebTestRunner.StartupVariation() at Microsoft.VisualStudio.TestTools.WebStress.WebTestRunner.PlaybackThread()

I've seen some similiar posts on other forums where a user corrects the problem by reinstalling VS2008 Service Pack 1, but I'm having no such luck.

Has anyone else here encountered this problem. To repeat, there is no problem with recording web tests, but I get an error when I execute them.

+2  A: 

I had a similar issue and I was forced to reinstall both Visual Studio 2008 and service pack 1. Did you reinstall both? Which flavor of Visual Studio 2008 are you using? Developer/Professional/Team System?

Ben.Vineyard
Yeah, it looks like the agent that is used to run the webtests cannot reference the Microsoft.VisualStudio.TestTools.WebTesting.WebTestContext correctly. Re-install
Nat
I am using VS2008 Professional. I tried re-installing. When I do the install, it shows in the "About" box that SP1 is installed already ( I suppose it must be on my install disc ). I'll try again tomorrow afternoon.By the way, is there some way to make adjustments to this "agent" to which to refer?
Rice Flour Cookies
I think I just found the problem. I think that in the "About" box, it said that I was using .net 3.5 SP1. I needed a different SP1 to apply to my VS2k8 installation, which I downloaded from Microsoft.Everything works now.
Rice Flour Cookies
Ah yes. Those are different. I'm glad everything worked out for you.
Ben.Vineyard
It looks like "Web Tests" are to be supplanted by "Coded UI Tests" in VS2010
Rice Flour Cookies