Service Virtualization

 View Only
  • 1.  How to Call Specific part from the responce file

    Posted Jul 14, 2020 11:13 AM
    Hi,

    I have request and responce files and in Request i have multiple request in an array and same in Responce.
    When i give some part of request and i should get same from responce file instead everything. How can i do it ?
    please find below request and responce example 

    Request:
    POST /rcs HTTP/1.1POST /rcs HTTP/1.1
    { "rcsRequest": [       
          { "transactionId": "", "transactionStatusCode": "", "postedTimeStamp": "", "transactionAmount": "", "accountNumber": "", "releaseStatus": "APP", "reason": "", "approvedBy": "", "approvedTimeStamp": ""        }, 
          { "transactionId": "", "transactionStatusCode": "", "postedTimeStamp": "", "transactionAmount": "", "accountNumber": "", "releaseStatus": "REJ", "rejectedBy": "", "rejectedTimeStamp": "", "reason": ""        }       
          ]
    }

    Responce:
    { { 
    "rcsResponse":[ 
               { "transactionId": "", "ackStatus": "APP"      },       
        { "transactionId": "", "ackStatus": "REJ"      }
    ]
    }

    what i am expecting is when i give 
     { { "transactionId": "", "transactionStatusCode": "", "postedTimeStamp": "", "transactionAmount": "", "accountNumber": "", "releaseStatus": "APP", "reason": "", "approvedBy": "", "approvedTimeStamp": ""        }

    in the Request body, i want to get only 
    {{ "transactionId": "", "ackStatus": "APP"      }

    I am using Postman for this, please help me with this


  • 2.  RE: How to Call Specific part from the responce file

    Broadcom Employee
    Posted Jul 14, 2020 11:58 AM
    Hi Vamsi,

    Why the recording request is different than what you are playing back?

    From the information you provided, you recording with the below request.

    { "rcsRequest": [
          { "transactionId": "", "transactionStatusCode": "", "postedTimeStamp": "", "transactionAmount": "", "accountNumber": "", "releaseStatus": "APP", "reason": "", "approvedBy": "", "approvedTimeStamp": ""        },
          { "transactionId": "", "transactionStatusCode": "", "postedTimeStamp": "", "transactionAmount": "", "accountNumber": "", "releaseStatus": "REJ", "rejectedBy": "", "rejectedTimeStamp": "", "reason": ""        }
          ]
    }

    and during play back you are using the below request:
     { "transactionId": "", "transactionStatusCode": "", "postedTimeStamp": "", "transactionAmount": "", "accountNumber": "", "releaseStatus": "APP", "reason": "", "approvedBy": "", "approvedTimeStamp": ""        }

    Can you create 2 requests and responses instead of creating one and achieve the functionality you are looking?

    Prema




  • 3.  RE: How to Call Specific part from the responce file

    Posted Jul 14, 2020 12:13 PM
    Hi Prema,

    Instead creating  seperate request and response files, is it possible to five them in single file and get output ?
    as i need to create 5 RR's. (is this the only way) ?

    Thanks


  • 4.  RE: How to Call Specific part from the responce file

    Broadcom Employee
    Posted Jul 14, 2020 12:46 PM
    VS creation is what you record is what you play back. If you want to have all the requests and responses in one file then you have to customize it.

    From the information you provided, the simplest way is to have different Request/Response files and create VS.





  • 5.  RE: How to Call Specific part from the responce file

    Posted Jul 14, 2020 02:50 PM
    Customize RR files ? how to customize ? 
    if there is option of customizing files, please let me know how to do it
    i am new to tool, please help me on this


  • 6.  RE: How to Call Specific part from the responce file
    Best Answer

    Broadcom Employee
    Posted Jul 14, 2020 03:17 PM
    I don't mean customize RR pairs but during recording you can use Request Data Manager DPH or Scriptable DPH to customize your requests/responses.

    Please look at the information on Request Response pairs https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/devops/devtest-solutions/10-6/using/using-service-virtualization/service-virtualization-concepts/request-response-pairs.html

    Request Data Manager DPH  documentation is available at https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/devops/devtest-solutions/10-6/using/using-service-virtualization/using-devtest-workstation-with-service-virtualization/creating-service-images/using-data-protocols/request-data-manager-data-protocol.html

    Scriptable Data Protocol documentation is available at https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/devops/devtest-solutions/10-6/using/using-service-virtualization/using-devtest-workstation-with-service-virtualization/creating-service-images/using-data-protocols/scriptable-data-protocol.html

    Create a Service Image from Request-Response Pairs documentation is available at
    https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/devops/devtest-solutions/10-6/using/using-service-virtualization/using-devtest-workstation-with-service-virtualization/creating-service-images/create-a-service-image-from-request-response-pairs/create-a-service-image-from-request-response-pairs-in-the-ui.html

    As you are new and requests are different during playback, I would recommend you to create multiple RR pairs and create VS.

    -Prema



  • 7.  RE: How to Call Specific part from the responce file

    Posted Jul 15, 2020 12:08 PM
    Thank You Prema


  • 8.  RE: How to Call Specific part from the responce file

    Posted Jul 14, 2020 04:00 PM
    Hi Rakesh,

    There are two ways to achieve the same.
    1--> Create multiple R-R pairs and use them accordingly
    2--> Use the data protocol combinations (SDP, RDM or RDC etc.) to manipulate the request and response sections accordingly.

    Thanks.
    Vaibhav J

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



  • 9.  RE: How to Call Specific part from the responce file

    Posted Jul 15, 2020 12:09 PM
    Thank you Vaibhav
    i never user any other protocol other than JSOn and REST
    one question, do you give any sessions one LISA Virtualization