USE CASE HAS BEEN VALIDATED WITH TDM 4.7 and Devtest 10.2 and 10.4
We have a pretty good integration use case story with Test Data Manager and DevTest.
The main use case being, "The ability to augment Virtual service with the synthetic data that is generated by TDM"
The documentation available is pretty lucid and well structured. Though it can wear you out with too many steps involved. Nevertheless it works well as I was able to achieve the following by sticking to the product doc
- Define a project
- Register a WSDL which creates an object for you
- Define DB Connection
- Create derived objects from WSDL into DB
- Define GENERATOR
- Import single data from RR pair
- Define Devtest portal connection
- Define data generation rules
- Generate synthetic data
- Export synthetic data to VS
- Verify if the VS has been augmented with synthetic data from TDM
Create VS using WSDL
A picture is worth 10,000 words - The story in pictures
Login to portal first
Switch the context to the newly created project from top right corner and then follow rest of the screens
Once registerd, the WSDL object would appear in the Objects lilst
At this point, we need to create a Databse in SQL Server which can hold the TABLES that are derived from the WSDL definition. For the sake of demo, I have created a fresh Database in SQL Server with name as BlogDemo and this DB connection need to be defined in TDM.
Define the DB Connection and then click TEST followed by SAVE. Once saved, the new connection profile should appear in the list of available connection profiles.
The next step is to create and register derived objects, meaning, we identify WSDL operation and create tables in DB
Select one among the many WSDL operations, choose the DB connection and create tables. You would be able to see that, there are tables created in the DB.
Next step is to create a GENERATOR object which is necessary to import RR pairs from a file to the derived DB Tables.
Importing RR pairs from a file to the derived DB Tables
Go back to the objects list from Modeling and click on the BlogDemoWSDL object
Click on the Import icon and fill in details. Drag and Drop request and response XML files. You would find a set of sample files here: https://docops.ca.com/ca-test-data-manager/4-7/en/files/506915874/506915877/1/1490769780334/medicare.wsdl
Once inmported, you would notice that the DB table is filled with records.
The next step in the integration is to do things on Devtest side. Create a virtual service using WSDL file. This would create a default implementation for all the WSDL operations; getSupplierByZipCode,
Next comes the CORE of TDM-Devtest Integraiton Piece. Using TDM, you could generate synthetic data and augment the Virtual Service (VS) with the synthetic data set. Lets see how this is done:
Open the Generator and clik on the generator object and then click on 'Relational Edit' and then select those 2 check boxes and click OK.
Once you click OK, certain changes happen to the way the tables are maintained by TDM. You would be shwon the result of this operation:
The next step is to alter DATA Generation rules. You do this as shown below. For this just click on the generator and then click on 'Select Tables' which will bring all the tables that were created earlier.
Just click on the table 'Response_SupplierData' and then you would be able to edit the data generation rules.
Use the following rules
@randlov(0,@seedlist(US Address Line 1)@,1)@
@randlov(0,@seedlist(US City State Zip County)@,1)@
@randlov(0,@seedlist(US City State Zip County)@,2)@
MAKE SURE YOU ADD THE RULE FOR REQUEST_GETSUPPLIERBYZIPCODE table's zip field too as shown below
Synthetic Data Generation Step
Click Publish button at the top which will bring up a page as shown below and click Publish
Once you click PUBLISH, a job is submitted and its status can be monitored as shown below
If you check the table, you would notice that 10 new records are inserted
Export SYNTHETIC data to running Virtual Service in DevTest
THis is the last step of the integration use case. In order to export synthetic data from TDM to Devtest, we need to set up a connection from TDM to Devtest. For this usecase, this integration is PURELY ONE-WAY. ie, from TDM to DEVTEST
First, configure Devtest connection details in TDM.
Next, export the synthetic data to running Virtual Service. MAke sure you choose the correct DB connection, schema and Virtual Service. Click Export
To track the status of submitted export job:
How to Test if the Virtual Service has been Augmented with Synthetic data from TDM ?
You cannot see the augmented transactions in the Virtual Service from Portal. However you could test the RUNNING virtual service using a simple test case in AppTest using Web Service -> Web Service Execution STEP. Try passing different zip code that you find in the table Response_SupplierData and you should get VALID SYNTHETIC RESPONSE.
Where does DEVTEST store the exported SYNTHETIC DATA from TDM ?
Devtest stores this data in another .VSI file that is present in a different location. Just see the screenshot below
This is file big in size, much bigger than the original file.
After exporting 100 Synthetic records, I generated another 1000 and exported. After export process, It is noticed that the lads folder has been updated and the VSI file size also increased. You could notice that the folder name has been changed. Most likely, the old folder has been dropped and a new one was created.
You can also DOWNLOAD MAR file from the running virtual service from PORTAL which will give you access to all the augmented transactions.