Service Virtualization

  • 1.  How to dynamically generate an excel sheet for filtered values from response?

    Posted Mar 06, 2017 04:50 AM

    I need to generate an excel while execution and append values in each columns with the filtered values from response in ITR. Can anyone help me with that?



  • 2.  Re: How to dynamically generate an excel sheet for filtered values from response?

    Posted Mar 06, 2017 08:41 AM

    Thinking out loud....  Assumption is that you want to write all of the output in a single test case -- not append data from multiple executions.

     

    1) Rather than Excel, can you use a CSV file format?  Your requirements indicate that you want to store off property values.  CSV is likely to require less overhead than Excel because not all of the Excel internal properties and representations are required.

     

    2) Have you considered the Save Property Value to File Utility Filter?  This filter supports the concept of 'append mode' which would allow you to string your properties separated by some type of delimiter into a row and add as many rows as required.

     

    3) You would likely have an initial step (Save Prop Filter) to establish the CVS file headers.  After that, add logic to concatenate the desired values into a property (perhaps via JSR-223, Scripted Assertions, etc.) followed by the Save Prop Value filter....

     

    This may be less tricky than setting up and managing Excel objects and the majority of the work is provided by out-of-box framework components.  All you have to do is get the concatenation part correct.



  • 3.  Re: How to dynamically generate an excel sheet for filtered values from response?

    Posted Mar 31, 2017 06:47 AM

    Hi Joel .  Thanks for the reply. My requirement is little bit different from the one you suggested. I need to add filters for each fields in my response and save it in an excel/csv format with the value and filter names separated. Like if i have a field like " Name: "Hima"" in my response , want to save it in two separate columns, one with field name for that field and other with the value.



  • 4.  Re: How to dynamically generate an excel sheet for filtered values from response?

    Posted Mar 31, 2017 09:32 AM

    If you mean to say that you have one filtered response whose value contains a set of K/V pairs and you need to store each of those K/V pairs, your logic just got more complex. DevTest can access the property value, but you will need to build logic that iterates the value content and creates its own set of Key/Values to write the into the file.



  • 5.  Re: How to dynamically generate an excel sheet for filtered values from response?

    Posted Mar 08, 2017 01:57 PM

    Hima,

     

    Did Joel's recommendations help you out with this issue?

     

    Regards,

    Reid