Service Virtualization

  • 1.  Excel or CSV as Databse

    Posted Sep 26, 2018 02:35 PM

    Hi community,

     

    It is possible to use and excel or csv file as a database for an virtual service ?

    I was wondering if it is possible to use as a database so that when performing a "add value" or "delete of a value" in the sheet, the virtual service reads the changes and reflect on the image / response automatic of a specific transaction.

     

    Thanks in advance

    João Paulo Ramos



  • 2.  Re: Excel or CSV as Databse

    Broadcom Employee
    Posted Sep 26, 2018 02:51 PM

    Yes you can use  excel or csv file  as external Data. 

     

    Data-driven virtual services let you use an external data set as a source of request arguments and response data. Data-Driven virtual service is configured in the DevTest Portal. The virtual service data uses parameters which coincides with the response parameters obtained via recording the Live APIs.

     

    please see documentation on this.  

     

    CA Service Virtualization - Data Driven Virtual Service 



  • 3.  Re: Excel or CSV as Databse

    Posted Sep 26, 2018 03:54 PM

    Hi Shiney,

     

    I already tried the Data Driven, but it's only for creating services. At least I did not see any other way.

     

     

    This service itself, which I have done, is for a demand in which they need that all the management be done by them. They don't want to depend on me. And they dont want/can user the Workstation or Portal.

    At least the management for this service will be more simples, because there is only one parameter to change.

    See the image below:

     

    So, I was wondering if it is possible to use something to add or/and remove the value of the parameter of the virtual service to reflect on the image/response in an automatic way. Using some steps of the Model Editor, Match Script or something like that, to read an file and make changes on the image.

     

    Thanks



  • 4.  Re: Excel or CSV as Databse

    Broadcom Employee
    Posted Sep 27, 2018 04:33 AM

    It would be a bad design decision to use a file for doing this, because it will add delays to the response, you'd need to work out how to lock the file if you get concurrent requests to update a value, you'd need to make sure your file paths are consistent, you'd need to make sure your file can be read by the running virtual service in a test lab when your user updating it is in a different location with no shared file system, etc, and we have both memory maps and a database built-in to DevTest that can do this out-of-the-box.

     

    So you want to keep count in a virtual service?  gives instructions and examples of doing this by storing data in a virtual service, storing data in a shared map inside the VSE, storing data in the DevTest database, and updating that data with values from virtual services.

     

    There are REST APIs and Java APIs to interact with the data if you select Persistent or Shared Model Maps. I suppose you could even create a virtual service that creates a web form to allow users to inspect and update values from a browser, but you'll need someone more familiar with creating web pages than me to make this.

     

    Rick



  • 5.  Re: Excel or CSV as Databse

    Posted Sep 27, 2018 09:12 AM

    Hi Rick,

     

    Thank you for you time and answer. I liked the idea of Web form to update the values and the service image.

    Do you know if it is possible to, after updating the web form, the virtual service runs automatically an "update" on the image and model, and do the deploy ?

     

    Also, do you know the complexity to implement such thing ?

    Do you know the best person to help me with that ?

     

    Thanks in advance.

    João Paulo Ramos