Service Virtualization

  • 1.  Virtual Service using Excel sheet

    Posted Mar 12, 2018 04:38 AM

    Hi Everyone, 

     

    I have the following requirement to be implemented in my project. Kindly help me in giving the best solution.

     

    • There is a spread sheet which has the values in two columns. (Account ID and the Parent Account ID). Both these values are unique. Each Account ID is associated with some unique Parent Account ID
    • When an incoming request comes I should pick the incoming Account ID and verify if it is present in the spread sheet, if yes then take the corresponding Parent Account ID and respond back.

     

    I want to do this activity in DevTest workstation. Kindly share your thoughts on this.

     

    J_NeSmith

    monika_mehta

    Deleted User

    PanditiAvinash

     

    Thanks

    Nikhil



  • 2.  Re: Virtual Service using Excel sheet

    Posted Mar 12, 2018 10:05 AM

    Hi Nikhil,

     

    I am afraid that you need to do this in the portal (as documented here Create Data-Driven Virtual Services - DevTest Solutions - 10.2 - CA Technologies Documentation



  • 3.  Re: Virtual Service using Excel sheet

    Posted Mar 13, 2018 02:22 AM

    Thank you wooda20 

    My question is ... Can't we do the same from the workstation ? 



  • 4.  Re: Virtual Service using Excel sheet
    Best Answer

    Posted Mar 13, 2018 05:04 AM

    Hi

    As I said, I am afraid that you need to do this in the portal.

    So not in the workstation.



  • 5.  Re: Virtual Service using Excel sheet

    Posted May 01, 2018 07:08 AM

    Hi kokumar4 ,

     

    I believe you can easily do this through Third party Jars using Apache POI classes . Apache POI classes are used to read/Write excel file . Hence once you are able to read file you can compare the same with your input property and further Parent account id can be fetched .  Since only one incoming account id is there you can traverse the sheet using that Account id column and if it matches then you can fetch Parent id and return true that will stop the script .

     

    Data Driven approach is completely different and enhanced and simplified as well . But before that above concept was used . Let me know if any other information is required . 

     

    Refer below two for implementation .

     

    Writing Response to Excel File - LOG Utility 

    Read Write From Excel File