Generating random data for tests

If you need to generate a great deal of various data, TestComplete will come in mighty handy with a special tool called Data Generator.

How to do it...

Let's suppose we need to generate a list of 100 people. To this end:

  1. Select the Test | Generate Data menu item.
  2. In the opened Data Generator Wizard window, select the Microsoft Excel worksheet option, and input the wanted file by name and then click on Next:
    How to do it...
  3. On the following screen, with the help of the Insert button, add as many fields as you need, and then rename them (for example, Last Name and First Name).
  4. For each of the fields, assign the appropriate data type (String, Integer, and so on) depending on the data type you are going to store in this field. With the help of the Edit button inside each data line, it is possible to customize the parameters of the generated data (intervals for numbers, length and type of the symbols for strings, and so on).
  5. In the Number of rows field signify the number of lines (100, in our case), that you would like to have generated, then click on Finish:
    How to do it...
  6. In the result, a file with all the necessary data will be generated for us:
    How to do it...

How it works...

TestComplete allows generation of different data types (strings, names, numbers, addresses, cities, and so on), diversifying their parameters within a wide range (the interval for the numbers, types of the symbols for strings, and so on).

Besides, it is possible to save the selected parameters with the help of the Save to User-defined button in order to have an available template for new data generation at your disposal in the future.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.136.18.141