Test Data Manager

  • 1.  How to generate the data in a column based on other column value.

    Posted Mar 04, 2017 02:24 AM

    Hi team,

     

    I am generating synthetic data using CA TDM. I am importing XML file and adding data generation rules to the tables. 

     

    My requirement is:

    I have 3 fields in address table.

    HouseNo, IntegrationID and LocationID. 

    I have set of data for these fields as shown in the below table.

     

    HouseNoIntegrationIDLocationID
    111111
    222222
    333333
    444444
    555555
    666666

     

    First i will generate the HouseNo, based on the HouseNo value, IntegrationID and LocationID values have to be picked from the list.

    Here for HouseNo, i am using the function: @randlov(0,@list(1,2,3,4,5,6)@)@, so any one value will be picked from the list.

    If the HouseNo is picked as 2, then in IntegratioID i want pick the value as 22 and in LocationID i want pick teh value as 222.

     

    Could anyone please let me know how to generate the data like this.

     

    Thank You.

    Regards,

    Rajasekhar



  • 2.  Re: How to generate the data in a column based on other column value.
    Best Answer

    Broadcom Employee
    Posted Mar 07, 2017 12:19 AM

    Hi Rajasekhar

     

    You already have it scoped out!

     

    You can do this with a table lookup.  Create a Table that has your exact setup that you have here, generate the key into that table, and simply populate your columns with your columns based on the key value.

     

    Cheers!

    Les



  • 3.  Re: How to generate the data in a column based on other column value.

    Posted Mar 14, 2017 08:36 AM

    Thank You Les.



  • 4.  Re: How to generate the data in a column based on other column value.

    Posted Mar 17, 2017 04:03 AM

    HI Rajasekar,

     

    I assume you have created a seed list for the Address table where you have added these columns HouseNo, IntegrationID and LocationID. 

     

    Using the function: @randlov(0,@seedlist(Address)0,1)@. 

     

    Table of Seedlist : Address 

    1 mention in the function, its referenced to HouseNo. Similarly, you can reference other values. 

    Also, you would able to add more address to seedtable in future when you foresee to add more addresses. 

    Hope it helps.

     

    Thanks,

    Jagadeesh



  • 5.  Re: How to generate the data in a column based on other column value.

    Posted Aug 01, 2017 09:08 AM

    Thank You Jagadeesh. Sorry for late reply. It worked for me.