Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Capture Traffic during Test Time Out

tapan1986
tapan1986 Posts: 27

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_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    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.

  • tapan1986
    tapan1986 Posts: 27

    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_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited January 2019

    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.

  • tapan1986
    tapan1986 Posts: 27

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

Tagged