Test Data Manager

  • 1.  How to generate Random Data for fixed percentages

    Posted Jul 15, 2017 11:39 AM

    Hi Team,

     

    I have the below requirement.

    For one of the fields, there are 4 valid values. Ex: V1, V2, V3 and V4

     

    I want to generate the data on percentage basis. 

    Ex: if i want to generate 100 rows, that field should contain V1 for 25 rows,V2 for 25 rows,V3 for 25 rows, V4 for 25 rows.

     

    If i use below functions, i am not getting as per the percentages.

    @randlov(0,@occlist(n%string,n%string[,n%string...])@)@
    @randlov(0,@perclist(n%string,n%string[,n%string...])@)@

     

    Could you please help me on this.

     

    Thank you.



  • 2.  Re: How to generate Random Data for fixed percentages
    Best Answer

    Broadcom Employee
    Posted Jul 19, 2017 11:36 AM

    Hi Raja,

     

    I was asked a similar question with regards to percentage of names - some many Andrews and Thomas.  The only way that this can be accomplished is through a seed list.  Please review this article:

     

    How to customize the names as required while generating the data?

     

    Cheers!
    Les.



  • 3.  Re: How to generate Random Data for fixed percentages

    Posted Jul 20, 2017 09:50 AM

    Did you try this?

    SEQLOV(PERCNULL, @PERCLIST(N%STRING, N%STRING[,N%STRING])@)



  • 4.  Re: How to generate Random Data for fixed percentages

    Posted Aug 01, 2017 07:12 AM

    Thanks Abhinav, It worked.