Service Virtualization

  • 1.  How to work with Conversational transactions in LISA service virtualization

    Posted Oct 18, 2016 02:41 PM

    Hi ,

     

    I would like to know how to work with Conversational transactions in LISA service virtualization.I will be in situation in my current project where i need  to work on Conversational transactions so please help me with each and every step to implement it.

     

    Requesting that please share the screenshots of each steps.

     

    With regards,

     

    Akshay



  • 2.  Re: How to work with Conversational transactions in LISA service virtualization
    Best Answer

    Posted Oct 19, 2016 04:34 AM

    Assuming that you are familiar with stateless transactions, you will find a good start to see the differences in VSE Transactions. This section of our product documentation lists differences how stateless and conversational (aka stateful) transactions are handled in VSE. To have an example you may want to record a conversational virtual service using the DevTest demo servers: Recording a withdrawal or deposit with LisaBank, for instance, will create one. If you have specific questions please let us know.



  • 3.  Re: How to work with Conversational transactions in LISA service virtualization

    Posted Jan 12, 2017 01:42 AM

    Hi Ulrich,

    I dont know how to use Demo server and LISA Bank. Could you please tell me how to install and use these server and bank.



  • 4.  Re: How to work with Conversational transactions in LISA service virtualization

    Posted Jan 12, 2017 05:02 AM

    For installing the DevTest Demo Servers see Installing the DevTest Demo Server in our product documentation.

    For your convenience:

    When downloading the DevTest product installer from CA Support Online you also have the option to download the DevTest Demo Server zip file. The DevTest Demo Server includes two Demo applications, LISA Bank and Forward Cars. 

    From Download Center in CA Support Online

    After downloading this Demo Server and unzipping the downloaded file, you will get another zip file, called DevTestDemoServer.zip. You copy this zip file to the same folder where your DevTest product installer binary (and the license file) is located. If you start the product installer, you will be offered the non-default option to install the demo server

    Installer option to install the demo server.

    and the location of the DevTest demo server zip file is preset. Continuing the setup wizard will install the demo servers Lisa Bank at LISA_HOME/DemoServer/lisa-demo-server and Forward Cars at LISA_HOME/DemoServer/carsdemo.



  • 5.  Re: How to work with Conversational transactions in LISA service virtualization

    Posted Jan 12, 2017 05:07 AM

    On how to use the demo servers, I recommend to work your way through the tutorials in our product documentation at Getting Started.



  • 6.  Re: How to work with Conversational transactions in LISA service virtualization

    Posted May 16, 2019 11:19 AM

    Hi Ulrich_Vogt,

    How to loop in a conversational transaction. As an example I have recorded from lisa bank in a way- Withdrawl-> Deposit-> check balance. Now , if i run the VS i can do only these transactions. After this if i do any transaction it will not send any responses. I tried with making a tree structure then also i couldn't get the responses. How can I do the withdrawl or deposit transaction 'N' number of times and get the updated value in the balance?

     

    Example- While recorded balance is 1000

    Now running in VS

    Deposit-100

    Withdrawl-100

    Withdrawl-100

     

    Now Balance should be- (1000+100-100-100)=900

     

    My question is how to parameterize and loop the transaction in 'VSI'/'VSM'

     

    Request you to please suggest some answer and if possible please share screenshot too as i am new to CA dev test.

     

    Thanks and Regards,

    Suvendu



  • 7.  Re: How to work with Conversational transactions in LISA service virtualization

    Posted May 17, 2019 05:44 AM

    Hi,

     

    Probably not an answer to your questions but some remarks first.

     

    First of all, a virtual service does not have an internal state, there is no internal database with business data. If during you recording there has been some request or response that contained the information "balance = 1000" that is not stored somewhere internally.

     

    So, if your testcase is using a stateful conversation and doing

    Deposit-100

    Withdrawl-100

    Withdrawl-100

    then for this to work there must have been some request or response at the start of the conversation that contains the balance otherwise the 1000 will not be known at all during the execution of the conversation

     

    You will have to store that balance in a property to be updated during the execution of the conversation. Either you will have to do that in additionnal steps within your VSM but you also have a lot of possibilities by using scripting inside your double curly braces within your responses.

    Example, if your response contains a magic string which contains the balance that was received in your request then you might have something like {{request_balance}} in your response. You can instead put {{conversation_balance=request_balance;}} . Your response will still contain the same number but now you have also stored that number inside the property "conversation_balance" for this instance of the conversation.

    Now your Deposit and Withdrawl transactions can have snippets in their responses like {{conversation_balance=conversation_balance+request_amount;}} (for a deposit). If the balance is not a piece of data in your response then you can still do the calculation by putting this snippet in a comment within your response eg. for XML that would be <!-- {{conversation_balance=conversation_balance+request_amount;}} -->  It depends on your data protocol if you can use comments.

     

    Finally, there is no concept of "looping" in a conversation, instead there is the concept of navigation tolerance which indicates what type of next request is accepted in the conversation and which can make the conversation move to another node in your conversation tree. Have a look at Navigation Tolerance - DevTest Solutions - 10.3 - CA Technologies Documentation 

     

    And then finally, probably the most important question which you need to ask yourself first: does the result of your testcase really depends on the balance being updated correctly? You are virtualizing your back-end, it is not part of your System Under Test, it is the backend that contains the business logic to store and calculate the balance for an account, this should normally not be something that your testcase should be worried about. Because if it would, if the correctness of that calculation is critical to the success of your testcase than it means that the back-end is part of your System Under Test and you should not virtualize it in the first place. If it is not critical then you can make an agreement that an "update balance" has a specific numeric format like the amount always ends with digits 999, so you know your System Under Test is displaying the upodated balance correctly without the actual number having to be correct.

    The above is not to be pedantic, there can be valid reasons why the virtual service would need to have to do these calculations, but the objective for every virtual service should always be to make the simplest possible simulation of your back-end which supports your testing, so the question should always be asked.

     

    Cheers,

    Danny