Test Data Manager

  • 1.  How to generate multiple child records, for each parent record?

    Posted Aug 02, 2017 01:44 AM

    Hi Team,

    We are trying to generate data in multiple related tables, where for each parent record we want to generate multiple child record. 

     

    For ex:

    There are 4 tables: Project, Release, Test Cycle and Test Cases. For each Project there need to by multiple releases, for each release there can be 4 test cycles and for each test cycle there needs to be 30-40 test cases.

     

    How can we achieve this using CA TDM? Any suggestion would be appreciated.



  • 2.  Re: How to generate multiple child records, for each parent record?

    Broadcom Employee
    Posted Aug 02, 2017 05:05 PM

    Hi Lalit,

     

    Have you looked here?

     

    Publish Data Using Datamaker

     

    Publish Data Multiple Times

    Enter the number of times you want to repeat publish in the Repeat field. 

    Note: If you are not using variables such as ~ITERATION~ or ~NEXT~, you can get duplicate values in your data output.

    Repeat Table Data Multiple Times

    If you want to repeat individual tables in a set of data:

    1. Right-click the table name and select Table repeat count from the context menu.
    2. Enter the number of times you want to repeat this table. You can also use functions, from the Functions pane, to vary the number of times a particular table is repeated. For example, @randrange(1,5)@ and @randnorm(1,100,70,10)@
      If you have created large volumes of data within a table, it is also possible to publish a small selection of rows. For example, enter -3 in the field publishes up to three rows from the selected table.

     

    By using a combination of the publish Iteration counter and table counters, you should be able to get your results.

     

    Cheers!
    Les.



  • 3.  Re: How to generate multiple child records, for each parent record?
    Best Answer

    Posted Aug 03, 2017 09:54 AM

    Hi Lalit, 

     

    Here is a suggestion from on our of Presales members:

     

    In data painter you will have to populate the "FK" with the related parent table column. In the "publish data pool" window you can right click on the relevant table and select "Table repeat count". You then specify a randrange function to address your requirement. E.g. up to 4 releases, up to 4 test cycles, etc. This would randomly generate projects that can have from 1 to 4 releases, each release from 1 to 4 test cycles and etc.

     

    Please let us know if any of the suggestions posted so far are helpful. 

     

    Best regards,

    Taylor



  • 4.  Re: How to generate multiple child records, for each parent record?

    Broadcom Employee
    Posted Aug 03, 2017 12:23 PM

    Hi Lalit,

     

    Agree with Taylor's solution above, make sure to reference the related keys of the tables so that the rows in each table are linked to each other. Then you can use the Table repeat count to vary the number of rows for each table.

     

    You can also use variables as well on the table repeat count if required.

     

    Thanks,

    Anil 



  • 5.  Re: How to generate multiple child records, for each parent record?

    Posted Feb 13, 2018 11:03 AM

    Hi Anil_Kumar_Appukuttan and @taylor

    Can you please share documentation link "how to use table repeat count"



  • 6.  Re: How to generate multiple child records, for each parent record?