Forum Discussion
What is it that you are trying to accomplish with this? Maybe we can find you an easier way to do it.
Hi Marsha,
I have few printers models, for each printer model i've created a row in an excel file, each printer model had sub-models but, each printer has a different number of sub-models.
I want to randomly select a printer and then randomly select printer's sub-model, means i first need to get the number of sub-models under the printer i've selected and then select this value from a combobox.
Thanks,
OV
- Marsha_R8 years ago
Champion Level 3
tristaanogre Would this be easier to do with a Table?
- tristaanogre8 years agoEsteemed Contributor
On one level, I understand the use of randomized input data for testing certain functionalities of an application under test... but when I'm doing test automation where I need to have predictable inputs generating predictable results, this is where randomization as a testing tool becomes a bit... cumbersome.
To be honest, rather than randomizing the data, I'd do one of two things:
1) Run loops to go through and check all sub printers for all printers to make sure they all work... nested for loops or while loops or a for loop in a while loop or something like that. Automation gives great benefit for executing a LOT of tests faster than executing them manually. So, rather than randomizing... just test them all.
2) Rather than selecting randomized data, come up with a respresentative subset. Think about the idea of boundary testing... test low end, high end, mid point, out of bounds low, out of bounds high, extreme high, extreme low, etc... not saying that those are the cases to use here, but I'm pretty sure that there is a subset of the printers and sub printers that can be used so that, rather than starting with ALL the data and then just randomizing something out of it, pick a few representative values and use them in the test case.
With either of these two, then you don't have to worry about picking a specific value out of a column... you just create your excel sheet for all the test cases you want to run and build a DDT loop around it and just exercise all the selected test cases. This then gives you predictability... I know that when I run the loop for my data set, the first test will have one set of printer/subprinter and I'll know what to expect, and the second time, and the third time...