Service Virtualization

 View Only
Expand all | Collapse all

Traditional virtualization with variable endpoint - REST

  • 1.  Traditional virtualization with variable endpoint - REST

    Posted Dec 02, 2021 09:49 AM

    Hey guys,

    I need help in virtualizing a service in the traditional model using DevTest in version 10.4. I'm trying to virtualize a service where calls are made through Postman, this service uses the token of another service as a parameter, making the endpoint variable. Is there any way to be able to virtualize this service? Even with a part of the endpoint being variable?

    The information I have follows in the screenshot below.


    Thank you for the support.



    ------------------------------
    Michel Silva
    ------------------------------



  • 2.  RE: Traditional virtualization with variable endpoint - REST

    Broadcom Employee
    Posted Dec 02, 2021 09:53 AM
    Hi Michel,

    With the Rest Protocol handler you can use the variables in the endpoint. Please look at the documentation https://techdocs.broadcom.com/us/en/ca-enterprise-software/devops/devtest-solutions/10-4/using/using-ca-service-virtualization/using-devtest-portal-with-ca-service-virtualization/rest-data-protocol-handler.html.

    Regards,
    Prema


  • 3.  RE: Traditional virtualization with variable endpoint - REST

    Posted Dec 02, 2021 10:07 AM
    The link is not carrying the information.

    Thank you for your help.

    ------------------------------
    Michel Silva
    ------------------------------



  • 4.  RE: Traditional virtualization with variable endpoint - REST

    Broadcom Employee
    Posted Dec 02, 2021 10:11 AM

    This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.





  • 5.  RE: Traditional virtualization with variable endpoint - REST

    Broadcom Employee
    Posted Dec 02, 2021 09:56 AM
    Hi,

    You can use the REST DPH, this DPH handles variable URLs.

    You will need to add a rule in the configuration of this DPH like:
    GET /service-for-test/{userId}

    With this your transaction signature will get an additional parameter 'userId' in addition to the query parameters 'operation', 'channel' and 'session'

    Cheers,

    Danny Saro

    Client Services Consultant

    Broadcom Software


    -------------------------------------------------


    This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.





  • 6.  RE: Traditional virtualization with variable endpoint - REST

    Posted Dec 02, 2021 10:06 AM
    Could this change be done via the workstation? Is there a documentation link to this information?

    Thank you for your help.

    ------------------------------
    Michel Silva
    ------------------------------



  • 7.  RE: Traditional virtualization with variable endpoint - REST

    Broadcom Employee
    Posted Dec 02, 2021 10:19 AM
    You can add the rules when you do the recording in Workstation also in the REST DPH configuration. For example, GET /service-for-test/{Token}/



  • 8.  RE: Traditional virtualization with variable endpoint - REST

    Broadcom Employee
    Posted Dec 02, 2021 10:25 AM
    Hi Michel,

    Yes, this change can be done in the workstation. It needs a coordinated change in the virtual service model and the virtual service image; they need to be in synch.
    The easiest way to get them synchronized is to build at the same time either via recording or via request/response pairs.
    If recording or creating is not acceptable then let us know and we can sketch out the steps to do it manually.

    Cheers,

    Danny Saro

    Client Services Consultant

    Broadcom Software


    -------------------------------------------------


    This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.





  • 9.  RE: Traditional virtualization with variable endpoint - REST

    Posted Dec 03, 2021 12:47 AM
    Hi Michel,

    It will need change in both VSI and VSM if you do it later using worktation, PFB the screenshots for reference:

    VSI:


    VSM:


    Thanks

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------