| Select A Random Web List Value |
|
|
|
|
Technique Description Static data entry is constrained by the fact that it doesn’t allow the automated script to automatically adjust with the dynamic applications. An advantage of inputting random data is an increased robustness of the scripts that more gracefully handle application changes. Another advantage is in the fact that over multiple automated test executions, test coverage is increased since different data may be entered in each run. This technique selects a random value from a list box (the current examples focus on web list boxes). The process for selecting a random value from a list box is as follows:
Downloadable Functions This section provides samples of the above technique in various scripting languages. Note that many automated test tools (commercial and open source) use industry standard scripting languages, therefore the code can be used in a standalone manner as well as in various tools (i.e. VBScript code can be used in QTP, and Ruby code can be used in WATIR). The prerequisite for running the downloadable code example is as follows:
The below links provide the code in .txt files. Download then change the extension appropriately.
Helpful External Links
|




