Service Virtualization

Expand all | Collapse all

Need to get value of http status code and text (present in response meta data) from excel file

Jump to Best Answer
  • 1.  Need to get value of http status code and text (present in response meta data) from excel file

    Posted 05-25-2018 08:10 AM

    I need to get value of http status code and text (present in response meta data) from excel file.

     

    Presently, I have given {{resp_code}} and {{resp_code_text}} in response meta data in VSI and fetching the values from excel file in VSM script.

    I have checked in INSPECTION VIEW - the data from excel file is fetched properly but I am getting this error in "Virtual HTTPS Responder" - "java.lang.RuntimeException: The response object is not formed properly. It is missing the response code meta data entry or it is invalid: code=400"


    (I had given status code = 400 and text = Fail in excel file)


    Please guide me on the resolution of this issue.


    Thanks in advance.



  • 2.  Re: Need to get value of http status code and text (present in response meta data) from excel file

    Posted 05-25-2018 08:19 AM

    by mistake, the question has been marked as assumed answered



  • 3.  Re: Need to get value of http status code and text (present in response meta data) from excel file

    Posted 05-25-2018 09:33 AM

    As far as I know, we can use the properties in VSI-->Response-->Meta Data. I haven't tried with the Response code and Text properties but tried other properties. By any chance did you change the Key names "HTTP-Response-Code" and "HTTP-Response-Code-Text"?



  • 4.  Re: Need to get value of http status code and text (present in response meta data) from excel file

    Posted 05-25-2018 10:25 AM

    Thanks for the reply.

    Actually, I haven't changed the Key names "HTTP-Response-Code" and "HTTP-Response-Code-Text". I had just provided the parameterized values in the meta data tab, but its failing with above error.



  • 5.  Re: Need to get value of http status code and text (present in response meta data) from excel file
    Best Answer

    Posted 05-28-2018 10:25 AM

    Which version of DevTest are you using? We recently experienced similar behavior. Check out this post which seems to discuss a similar issue:

    HTTP-Response-Code to {{=request_string_local_name_returnCode_}} a property 



  • 6.  Re: Need to get value of http status code and text (present in response meta data) from excel file

    Posted 06-05-2018 06:17 AM

    Vinay,

     

    Did Joel's update help you out regarding your question?