Ask a questionAsk a question
 

AnswerAdd Request Plugi in To all requests in vs2008

  • Monday, November 02, 2009 10:25 AMMiro1977 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have both vsts2005 and vsts2008.
    I write a request plugin in 2005 and in 2008.
    When I try to add the request plugin in 2008 I notice that is not the same as in 2005.
    In 2005 right click on the scenario name - and I can add request plugin  to all request together but in 2008 I can't do it.
    I need to over on each request and add the request plugin .

    There is a better way to do it ?
    MIRO77

Answers

All Replies

  • Tuesday, November 03, 2009 8:15 AMMiro1977 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    As no one was answer, I was still search till I found this on MSDN :

    " In Visual Studio 2005 Team Edition for Testers, it was possible to create a request plug-in at the test level that ran for every request in the test. In Team System 2008 Test Edition, test-level plug-ins support the request-plug-in interface and will apply to every request in the test. When Team System 2008 Test Edition encounters a request plug-in that was created in Visual Studio 2005, it converts the plug-in to an equivalent test-level plug-in. "


      See the original linl: http://msdn.microsoft.com/en-us/library/bb514192.aspx


    MIRO77
  • Wednesday, November 04, 2009 6:14 AMEdwer FangMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hello Miro1977,

    In VS2008, we could overwrite PreRequest and PostRequest in web test plug in, which could set propery on each request.

    You may refer to the following article for more detailed information.
    http://blogs.msdn.com/slumley/pages/setting-request-properties-with-a-web-test-plug-in.aspx
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
  • Thursday, November 05, 2009 3:17 PMslumley MSFTMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    The way to do this in VS 2008 is create a web test plugin that overrides the Pre/Post request methods. The web test plugin also still has the pre/post webtest methods that you can override.   In VS 2008,  a request plugin is used for a single request.
    Blog - http://blogs.msdn.com/slumley/default.aspx