| Author |
Message |
ranjeet
Joined: 17 Aug 2011 Posts: 3
|
Posted: Wed Aug 17, 2011 7:12 am Post subject: Controlling the distribution of generated data |
|
|
HI
Is there any means by which we can control the distribution of generated test data.
i.e I have a 'VISIT' table with a column name 'VISIT TYPE' [with any one of three types of input data 'Inpatient','Outpatient' or 'Emergency'], so i would like to generate the data in such a manner that 60% of the generated data should be 'Inpatient', 20% should be 'Outpatient' and 20% should be 'Emergency'.[If we are generating 100 rows for visit table then 'VisitType' column should contain 60-Inpatient , 20-Outpatient,20-Emergency data rows]
Regards,
Ranjeet |
|
| Back to top |
|
 |
james.billings
Joined: 16 Jun 2010 Posts: 864 Location: My desk.
|
Posted: Thu Aug 18, 2011 1:59 pm Post subject: |
|
|
There is a "weighted list" generator under "Generics" that may do what you want.
You could add the values as:
Inpatient 6
Outpatient 2
Emergency 2 |
|
| Back to top |
|
 |
ranjeet
Joined: 17 Aug 2011 Posts: 3
|
Posted: Fri Aug 19, 2011 6:10 am Post subject: |
|
|
Hi
Thanks for the reply.I tried to generate the data with the "Weighted List" as you mentioned.But it is not generating exact number of rows
for eg: When I tried to generate 100 rows .it will generate 55 -Inpatient,25-Outpatient and 15-Emergency.
If i generate only 10 rows then it will generate 7-Inpatient , 3-Outpatient and it will not generate any Emergency values.
Regards,
Ranjeet. |
|
| Back to top |
|
 |
james.billings
Joined: 16 Jun 2010 Posts: 864 Location: My desk.
|
Posted: Fri Aug 19, 2011 7:58 am Post subject: |
|
|
| You could try specifying the figures as percentages - i.e. 60,20,20. Does that help? If not, I'll probably need to raise a bug for it not working quite correctly. |
|
| Back to top |
|
 |
ranjeet
Joined: 17 Aug 2011 Posts: 3
|
Posted: Fri Aug 19, 2011 8:14 am Post subject: |
|
|
Hi
I tried with 60%,20%,20% and it is generating 'Inpatient-55','Outpatient-25'and 'Emergency-20' and my seed value is 3068.If you need any info please let me know.
Regards,
Ranjeet |
|
| Back to top |
|
 |
james.billings
Joined: 16 Jun 2010 Posts: 864 Location: My desk.
|
Posted: Fri Aug 19, 2011 10:44 am Post subject: |
|
|
I've tested this out some more and it does seem to be not working correctly.
I've raised a bug (SDG-945) for this to get looked at; although I'm not sure when this will be unfortunately. |
|
| Back to top |
|
 |
|