Ask a questionAsk a question
 

QuestionMigrating and running a Web test with VS2010 Beta 2

  • Wednesday, November 04, 2009 8:19 AMronyg Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I recently migrated our web tests from vs2008 into vs2010. migration, and compilation went fine.

    trying to run the test, i get "the agenr process was stopped while the test was running"

    what is there to do?

All Replies

  • Wednesday, November 04, 2009 5:43 PMJustin Pinnix - MSFTMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    If you create a new web test under 2010 and run that does it work correctly?

    If these are coded web tests, can you step through them in the debugger and detemrine what part of the test is causing the agent to crash?

    I'm assuming these tests are being executed locally and not on a remote agent.

    Thanks,
    -JP

  • Thursday, November 05, 2009 7:55 AMronyg Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    True, I run them locally.

    Here's what I found:

    1. If I create a new project with vs2010, record a web test, run it. it works fine.
    however, if i add my web test plugin that was created with vs2008, it just doesn't count it, and actually ignore it. ( I filter some dependents, as you can see below, and it just ignore it.)

    the plugin looks like that: ( inherit from WebTestPlugin )

    public

     

     

    class TestPlugin_FilterDependents : WebTestPlugin

    {

     

     

    public override void PostRequest(object sender, PostRequestEventArgs e)

    {

     

     

    List<WebTestRequest> remove = new List<WebTestRequest>();

     

     

    foreach (WebTestRequest dependent in e.Request.DependentRequests)

    {

     

     

    if (dependent.Url.EndsWith("StyleIE.css"))

     

     

    remove.Add(dependent);

     

     

    }

     

    }

    }

     

     

     

     



    2. If i run my test, taken from vs2008, it crashes in this plugin, in the following line:

    foreach

     

     

    (WebTestRequest dependent in e.Request.DependentRequests)

    i get "NullReferenceException was handled by user cosde".

    Just to make it clear, this is new. if i run it with vs2008, no problem.

  • Tuesday, November 10, 2009 5:09 PMslumley MSFTMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    2 thigns.

    1) Did you recompile the plugin with vs 2010?
    2) Can you put a breakpoint on that line and let me know which object is null?

    I copied this plugin and was not able to repro.
    Blog - http://blogs.msdn.com/slumley/default.aspx
  • Wednesday, November 11, 2009 9:07 AMronyg Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    1. I did compile the plugin with vs 2010. it compiled with success.
    2. I get Null reference in PostRequest with 'e.Request.DependentRequests' in the first foreach loop.

    what else, i found odd:
    my test goes like that:
       first request: http://test..../InputPage.aspx
       then a coded test, consists of more requests.

    with the first request, it just doesn't go to the PostRequest method, where i filter the dependents.

    with the request withing the coded test, it does go to the PostRequest, and then it gets the 'NullReference'.

    more info:

    XP + IE7. the whole solution compiles with no errors.