Service Virtualization

Expand all | Collapse all

Facing issues while creating custom filter - "Save resultset to Excel" filter

Jump to Best Answer
  • 1.  Facing issues while creating custom filter - "Save resultset to Excel" filter

    Posted 09-22-2017 07:15 AM

    Hi ,

     

    I am creating a custom filter to save response of JDBC resultset in an excel file. I am facing below issues -

     

    If I enter path to save file as "{{LISA_HOME}}"\abc.xlsx or use a outputstream class while adding parameters to custom filter , the {{LISA_RELATIVE_PROJ_ROOT}} path is not recognized by code. please let me know how to rectify this?

     

     

    Also how can I abort the testcase incase of any exception ? 



  • 2.  Re: Facing issues while creating custom filter - "Save resultset to Excel" filter

    Posted 09-22-2017 11:30 AM

    Hi, I just tried saving the JDBC result set to text file by navigating to the Project/Data folder ( {{LISA_RELATIVE_PROJ_ROOT}}/Data/jdbc.txt ) path and DevTest automatically used "LISA_RELATIVE_PROJ_ROOT".

     

    Did you type in the property "LISA_RELATIVE_PROJ_ROOT" or navigated to the folder? Try navigating to the folder and give the file name.

     

    By design, JDBC step gives you an option to "Abort the Test" if any sql error occurs. Is this what you are looking?

     

    Thanks,

    Prema



  • 3.  Re: Facing issues while creating custom filter - "Save resultset to Excel" filter

    Posted 09-23-2017 03:06 PM

    Hi Prema,

     

    I have created my own custom filter to save JDBC resultset in an excel file. 

    I have used TestExec.parseInState method to get the value of {{key}}, this code is now working fine for LISA_HOME but not for LISA_RELATIVE_PROJ_ROOT.

     

    I have tried by navigating to the folder and specifying to the above property . An error message is display - can't find the specified path (null).

     

     

    Thanks



  • 4.  Re: Facing issues while creating custom filter - "Save resultset to Excel" filter

    Posted 09-25-2017 09:24 AM

    Which version of DevTest are you using?

     

    Did you try specifying the path outside of the project path?



  • 5.  Re: Facing issues while creating custom filter - "Save resultset to Excel" filter

    Posted 09-26-2017 03:23 AM

    I am using DevTst 9.5.1. 

     

    Yes it is working fine if I enter path without any properties. 

     

    It is throwing error-"can't find the specified path (null)."  only in case of {{LISA_RELATIVE_PROJ_ROOT}}. Do I need to add anything in my code ?



  • 6.  Re: Facing issues while creating custom filter - "Save resultset to Excel" filter

    Posted 09-26-2017 09:49 AM

    Instead of {{LISA_RELATIVE_PROJ_ROOT}} create another property with the path you are looking and use that property.



  • 7.  Re: Facing issues while creating custom filter - "Save resultset to Excel" filter

    Posted 09-27-2017 09:52 AM

    I tired by specifying by creating another property with the path in project.config and it didn't worked. I am still getting same error.



  • 8.  Re: Facing issues while creating custom filter - "Save resultset to Excel" filter

    Posted 09-28-2017 12:22 AM

    Can you share the custom filter code?

    Based on the information provided so far - it is not apparent what is causing your issue.



  • 9.  Re: Facing issues while creating custom filter - "Save resultset to Excel" filter

    Posted 09-29-2017 05:25 AM

    please provide me email id to share the code....



  • 10.  Re: Facing issues while creating custom filter - "Save resultset to Excel" filter

    Posted 09-28-2017 09:16 AM

    If you open support case, we can do a WebEx and look into the issue.

     

    Thanks,

    Prema



  • 11.  Re: Facing issues while creating custom filter - "Save resultset to Excel" filter

    Posted 09-29-2017 05:25 AM

    pleas provide me link to open a support case and also what details are required?



  • 12.  Re: Facing issues while creating custom filter - "Save resultset to Excel" filter

    Posted 04-20-2018 09:42 AM

    In documents it is mentioned that {LISA_HOME} property can't be used while creating custom extensions , can you let me know how can i use it code as it is not more clear in documentation....



  • 13.  Re: Facing issues while creating custom filter - "Save resultset to Excel" filter
    Best Answer

    Posted 04-23-2018 06:13 AM