Test Data Manager

 View Only
  • 1.  How to restrict seed list values

    Posted Jan 16, 2020 01:20 PM
    Hi ,

    I wanted to generated the data from a seed list randomly but want to restrict the data ,while maintaining the relationship with other values.

    In the example below : I have a seed table Test has two columns Country and currency , while generating data I want 50% of data should have Country as United Kingdom .Please let me know what is the best way to achieve this ?

    50% Test Country United Kingdom Currency GBP
    30% Test Country Poland Currency EUR
    20% Test Country India Currency INR

    Thanks,
    Krushna


  • 2.  RE: How to restrict seed list values

    Posted Jan 17, 2020 03:46 AM
    Hi Krushna,

    If you create 10 seedlist records of which 5 UK, 3 Poland and 2 India the generated records will probably end up in a 5|3|2 ratio.

    Best regards,
    Klaas-Jan


  • 3.  RE: How to restrict seed list values

    Posted Jan 20, 2020 06:36 AM
    Hi Klass-Jan ,

    Thank you for your replay , I have tried with this approach , but still I am not able to achieve 5|3|2 ratio .

    Best Regards,
    Krushna


  • 4.  RE: How to restrict seed list values
    Best Answer

    Posted Jan 20, 2020 07:11 AM
    Hi Krushna,

    I checked with a collegue. If you use the following string you get random feedback in the given ratio:

    @randlov(0,@occlist(50%United Kingdom,30%Poland,20%India)@)@


    Best regards,
    Klaas-Jan


  • 5.  RE: How to restrict seed list values

    Broadcom Employee
    Posted Jan 21, 2020 04:42 AM
    Note that you will only get the 5|3|2 ratio when you have a large dataset. 
    Suppose you add 10000 records then you should get that ratio

    Regards, Dahman





  • 6.  RE: How to restrict seed list values

    Posted Jan 21, 2020 06:02 AM
    The below functions may help your query

    @percval(50%@randlov(0,@seedlist(US Phone no)@)@,50%@randlov(0,@seedlist(Uk Phone no)@)@)@