locked
Using the "Coded" page in another project RRS feed

  • Question

  • Hi.

    I think this may be more of a "conceptual" question than technical as what I want to do may not even be allowed.

    I've recorded a web test and generated a VB "coded" page (a class). I'd like to now either use the compiled DLL or just add the class to a brand new console application that will, in turn, run the web test via the class.

    I've run into all sorts of fun and have gotten through everything but now I get a runtime error.

    Note: I've manually added the c:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.WebTestFramework.dll reference to the console app so I figured I was good to go. Nope.

    Now I get an "Object reference not set to an instance of an object." error when the first request is attempted:

    MyBase.Send(request1)

    So, two questions:

    1. Can I even reuse a "coded" class module in another app (such as a console or winform app) or does it have to be used in a "test app"?

    2. If it can be used, like any normal class module, why am I getting this error?

    The test is a very simple proof of concept - just go to a URL and log in. I haven't even gotten into the heavy stuff yet (like AJAX'd pages).

    Again - what I am trying may not be supported so the technical runtime error could be a moot point. :)

    Thanks-

    Dave

    Tuesday, March 1, 2011 3:54 PM

Answers

All replies