Service Virtualization

 View Only
  • 1.  Test Data Creation using virtual service

    Posted May 24, 2017 06:31 AM

    Hi,

     

    In my project there is a requirement for dynamic test data creation from virtual service.

     

    Below said is the sample test data,

     

    0000000000000A2017007111322P003003GMAC020101301  -> Header
    1000000022001 00000250000 0001634129952017017 00A 0001 00002001Y -> Detail Record
    1000000001158 00000072000 0002634129932017017 00A 0201 00002001 -> Detail Record
    70000200199999999900000322000000002 -> Batch record
    1000000001149 00000070000 0001634129952017017 00A 0101 00002002 -> Detail Record
    70000200299999999900000070000000001 -> Batch Record
    999999999999900000392000000003000002 -> Footer

     

    My input request is SOAP request with all the above inputs, along with fields and response is above Test data.#

    Currently i have a virtual service that can create static test data as above. But my requirement is to create dynamic test data through virtual service based on the inputs.

     

    For Example: Number of Detail Records and batch records vary based on the requirements, my virtual service should handle that and provide me the appropriate response. Anyhow Header and Footer will always remain same.

     

    2 detail records, 1 batch record

    10 detail records, 2 batch records etc

     

    I do understand that i have to write Java script to handle it, but am having minimal experience in that.

    Request, Is anyone there who can help me on this requirement.

     

    Regards,

    Aravind



  • 2.  Re: Test Data Creation using virtual service
    Best Answer

    Posted May 24, 2017 01:35 PM

    Hi Aravind,

     

    Have you checked out documentation on Data-Driven virtual services.  I would just record the different types of requests that your service is going to receive,  and supplement them with a dataset.

     

    For more detail,  check out our documentation below.  If you need further help,  I would suggest opening a support ticket.

     

    Create Data-Driven Virtual Services - DevTest Solutions - 10.1 - CA Technologies Documentation 



  • 3.  Re: Test Data Creation using virtual service

    Posted Jun 28, 2017 02:03 AM

    Hi Joe,

     

    Thanks for your reply.

    I have gone through the documentation "https://docops.ca.com/devtest-solutions/10-1/en/using/…

     

    In the documentation, suggestion is to Add a new user defined signature to create a data driven virtual service, but when i checked DevTest portal am unable to fine the option to create a new signature, could you please share me the steps to do so or could you please redirect me to the URL where i can get the complete procedure.

     

    Thanks in advance.

     

    Regards,

    Aravind



  • 4.  Re: Test Data Creation using virtual service

    Posted Jul 07, 2017 09:47 AM

    Hi, Aravind,

     

    As mentioned by Support you can use the data-driven with XLS/CSV:

     

    There is no "Add new signature" button/option in portal. The document says that to create a data-driven virtual service, you can start by adding a blank signature with an associated data set. The resulting signature does not have any request arguments. You add the arguments in a later procedure. So, you would need to create a data-driven virtual service and leave its signature blank.

    Follow these steps:

    1. Open a virtual service.
    2. Ensure that the advanced mode is displayed.
    3. In the Stateless Signatures pane, click the Add icon and select Add New Signature.
    4. Enter the operation name.
    5. Move the Data Driven Behavior slider to the right.
    6. Select an Excel file or a CSV file to upload. If the From Existing option is available, you can select a previously uploaded file.
    7. Click Done. The blank signature is added.

     

    Adding kadne01