Capture Traffic during Test Time Out

tapan1986tapan1986 Posts: 25

How can Capture the traffic(Mainly Request) and no response during a test is got timed out.
This is for health check of the API.we need to pass the traffic object to a extension tool.

Tagged:

Comments

  • benken_parasoftbenken_parasoft Posts: 645 ✭✭✭
    edited December 2018

    we need to pass the traffic object to a extension tool.

    Chain an Extension tool to the Traffic Object output. For example code, see this earlier thread: get Data From Traffic Viewer Object

    Please also note that if the connection timed out then no request was actually sent to the endpoint. However, client tools generate a minimal Traffic Object containing the request body that would have been sent if the connection had succeeded.

  • tapan1986tapan1986 Posts: 25

    However, client tools generate a minimal Traffic Object containing the request body that would have been sent if the connection had succeeded

    I just need this minimal traffic object in my extension tool but currently I am not able to capture during test time out.Could you pls advise any other way we can capture the traffic or error during test time out?

  • benken_parasoftbenken_parasoft Posts: 645 ✭✭✭
    edited January 3

    Could you pls advise any other way we can capture the traffic or error during test time out?

    To clarify, there is no real traffic if the timeout occurred when trying to connect. What you see in the Traffic Viewer is "fake", showing what would have been sent but wasn't actually sent. So, if you are looking to log the actual, real traffic then there would be none in this case.

    Concerning the "Traffic Object" output, the Traffic Viewer is only run on connection timeout and not other tools chained to that particular output. However, any tools chained to the Request Traffic output are still executed, since those tools are executed prior to ever connecting to the endpoint URL. If you were to chain an Extension Tool to the Request Traffic output then the request payload is provided as the first argument to the function you define in your script.

  • tapan1986tapan1986 Posts: 25

    To make it simple I need to capture the request is timed out in a script.By any means can we do that?

Sign In or Register to comment.