Hi,
In LISA i had created some virtual services. Now i want to store some xml field values into database and verify those values. So i want to know where we have to write code or script and where to insert values into database.
Hi,
In LISA i had created some virtual services. Now i want to store some xml field values into database and verify those values. So i want to know where we have to write code or script and where to insert values into database.
To get clarity on this, are you looking to create a test case which will call your Virtual Services to get responses and within that test case you also wants to call DB to compare stored responses against Virtual Service responses? Is that right?
Is it necessary for you to use DB or you can store responses in excel sheet (as an alternative option) and compare against responses from Virtual Services?
I will give one example what actually i need.
I have one ONT id, for that i had created connect usecase in that i have 5 virtual services. In that 5 virtual services i have few parameters i need to store in database.
I don't have idea about how to retrieve values from xml response file and store in database.
What I am still not sure is, exactly at what point within the workflow of a virtual service you want to store values in DB while reading from XML response file (this XML response file refers to XML response VS has returned or it is a response stored already somewhere within the XML file residing on file system?).
Generally what happens that you call a Virtual Service from either a Lisa Test case or from 3rd party webservice client. Once you call Virtual Service you receive response and you can put filters on the response received from VS to store few values as properties and you can put assertions to validate the response and to control the flow of the transaction based on that response.
Do you want to store values within DB just after you receive response from VS?
1. Create a test case and first test step of your test case would be "Read a File Step" under External/Subprocess. In this step you will provide your XML file as an input and put XML path filters on values you are interested to store using filters under XML.
2. Create a test step "SQL Database Exection (JDBC)" under whatever DB vendor you are using e.g Oracle. Within that test step you need to provide connection setting and query for inserting something into DB.
See documentation guide regarding steps you are interested in below:
https://wiki.ca.com/pages/viewpage.action?pageId=252023790
https://wiki.ca.com/pages/viewpage.action?pageId=252023768
1. Create a test case and first test step of your test case would be "Read a File Step" under External/Subprocess. In this step you will provide your XML file as an input and put XML path filters on values you are interested to store using filters under XML.
2. Create a test step "SQL Database Exection (JDBC)" under whatever DB vendor you are using e.g Oracle. Within that test step you need to provide connection setting and query for inserting something into DB.
See documentation guide regarding steps you are interested in below:
https://wiki.ca.com/pages/viewpage.action?pageId=252023790
https://wiki.ca.com/pages/viewpage.action?pageId=252023768