Service Virtualization

  • 1.  Ignore HTTP Header during recording

    Posted Mar 07, 2019 01:36 AM

    Hi There

     

     Is there a way we can tell DevTest tool to Ignore HTTP headers during SV recording. Any configuration available in DevTest 10.4? Having a SOAP/HTTPS service which sends some custom headers, would like to ignore them when recording is done.

     

    Thanks

    Ajay



  • 2.  Re: Ignore HTTP Header during recording

    Posted Mar 07, 2019 08:21 AM

    By using the term 'ignore HTTP headers', do you mean that you do not want the service to store certain HTTP headers in the VSI? If yes, see if the Request Data Manager DPH (Request Data Manager Data Protocol - DevTest Solutions - 10.4 - CA Technologies Documentation) can do what you want. Perhaps, what you could do is use the KEEP functionality to keep only the desired headers and remove all others.

     

    Note: The HTTP/S headers are retained in the Meta Data and are not used by the VSI for comparisons unless you move or copy one or more headers into the VSI's Argument list.  Therefore, the headers are pretty much unused by the VSI during recording and playback unless specific processing behavior is added.



  • 3.  Re: Ignore HTTP Header during recording

    Broadcom Employee
    Posted Mar 07, 2019 08:47 AM

    As Joel mentions correctly, the HTTP headers in the requests are not influencing any matching algorithm, so there's no need to clean these up.

     

    But perhaps you are referring to response-side HTTP headers?

    A Request Data Manager DPH cannot be used to manipulate those.

    I would see two options,

    • a scripting step after the Virtual Image Response Selection step whereby you remove the required metadata parameters from the lisa_vse_response object
    • another option might be considered unsupported but it might be something I would resort to, ie. I am pretty sure that if you open up your vsi in Notepad++ that you could use a regex-based search-and-replace-all to remove the required metadata parameters from the xml. That would be a one-time manual step after the recording before deploying the virtual service.

     

    Just my 2 cents,

    Danny



  • 4.  Re: Ignore HTTP Header during recording

    Posted Mar 07, 2019 08:54 AM

    +1, agree with DannySaro. The Scriptable approach could also be used in the Response-Side during recording to remove Meta Data.



  • 5.  Re: Ignore HTTP Header during recording

    Posted Mar 07, 2019 11:09 PM

    To be specific while performing the recording the recorder is not able to capture any transaction, ie transaction count was not getting increased on investigating further found out that the workstation log file was showing a HTTP header error.

     

    So point is I am only in recording phase and the transaction is not getting intercepted by DevTest and the logs indicate some sort of HTTP header error in request / response which is preventing Devtest to capture the transaction. (Real application is able to call the service is getting the proper response, even invoked the real service via SOAP UI got the response)

     

    So this led me to ask the initial question - if there is a way during recording devtest internal code can just ingore headers and capture the transaction.



  • 6.  Re: Ignore HTTP Header during recording

    Broadcom Employee
    Posted Mar 08, 2019 12:55 AM

    HI Ajay

              Could you share the error that you noticed in workstation log file. I can check and revert to you.

     

    -Sankar



  • 7.  Re: Ignore HTTP Header during recording
    Best Answer

    Posted Mar 12, 2019 01:14 AM

    Well this turned out be a bug from the application side, for couple of Customer header field it was sending blank/null values which was causing the tool to throw the HTTP header error.

    Once the application started passing the values correctly in the header was able to see the transaction getting captured correctly.

     

    Thanks

    Ajay