locked
Redirects RRS feed

  • Question

  • Which event in the web test plugin are Redirect handeld in??

    I have a web test that when you run it displays the details like this:

    Recorded URL

    ---> Redirect

    ---> Redirect

            Dependent Request

            Dependent Request

    Recorded URL

    The Recorded URLs I have can via Pre or Post request.  I can tell if a Request is a Redirect or one of my recorded URLs.  I can tell how many Dependent Requests a Request has.  But when the Dependent Requests are sent they dont show up in any of the events in the web test plug in. 

    But they do show up when you run the test and it shows each request being sent, it shows redirects, it shows dependent requests and it totals all the repsonse bytes for them.

    How do you get the details on dependent requests via web test plugin?


    • Edited by MKT44 Tuesday, November 20, 2012 11:18 PM typo
    • Moved by Amanda ZhuModerator Wednesday, November 21, 2012 7:02 AM (From:Visual Studio UI Automation Testing (includes Coded UI tests))
    Tuesday, November 20, 2012 9:03 PM

Answers

  • Hello MKT44,

    Glad to receive your reply.

    I did some research and did not find any related APIs to provide the size and response time of each dependent request directly.

    For this issue, you could submit this feature request:

    http://visualstudio.uservoice.com/forums/121579-visual-studio

    The Visual Studio product team is listening to user voice there. You can send your ideas/suggestions there and people can vote.

    In addition, as far as I know, the top level page is requested from the server, then dependent requests will be download in paralle(until the browser inspects the top level page it has no idea what dependents the page needs).

    If you want to calculate the response time of the dependent request in web test plugin, I think that maybe you can track the top level request and detect the two times when the dependent request starts and finish programmatically.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    • Proposed as answer by Amanda ZhuModerator Monday, November 26, 2012 12:40 AM
    • Marked as answer by MKT44 Monday, November 26, 2012 2:33 PM
    Thursday, November 22, 2012 2:00 AM
    Moderator

All replies

  • Hello MKT44,

    Thank you for posting in the MSDN forum.

    Which event in the web test plugin are Redirect handeld in??

    I did some researches and did not find Redirect event in web test plugin. But as I know, we can control the request redirection through “FollowRedirects” property of a request. Or we can use FollowRedirects and IsRedirectFollow in WebTestRequest class in web test plugin.

    For more information, please see: WebTestRequest Class

    http://blogs.msdn.com/b/rogeorge/archive/2011/06/01/visual-studio-webtest-validation-rules-built-in-response-url-rule-is-case-sensitive.aspx

    In addition, we can operate dependent requests through PostRequestEventArgs in web test plugin, please see the following blogs:

    Dependent request filter for Web tests

    WebTestRequest.DependentRequests Collection

    Reference:

    PostRequestEventArgs Class

    WebTestRequest Class

    For example, you can use e.Request.DependentRequests and e.Request.HasDependentRequests properties to work with dependent requests.

    I hope it can help you.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us




    Wednesday, November 21, 2012 7:53 AM
    Moderator
  • How do I get the repsonse for each dependent request?

    I need to see the size and repsonse time for each one.

    Wednesday, November 21, 2012 3:47 PM
  • Hello MKT44,

    Glad to receive your reply.

    I did some research and did not find any related APIs to provide the size and response time of each dependent request directly.

    For this issue, you could submit this feature request:

    http://visualstudio.uservoice.com/forums/121579-visual-studio

    The Visual Studio product team is listening to user voice there. You can send your ideas/suggestions there and people can vote.

    In addition, as far as I know, the top level page is requested from the server, then dependent requests will be download in paralle(until the browser inspects the top level page it has no idea what dependents the page needs).

    If you want to calculate the response time of the dependent request in web test plugin, I think that maybe you can track the top level request and detect the two times when the dependent request starts and finish programmatically.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    • Proposed as answer by Amanda ZhuModerator Monday, November 26, 2012 12:40 AM
    • Marked as answer by MKT44 Monday, November 26, 2012 2:33 PM
    Thursday, November 22, 2012 2:00 AM
    Moderator