Creating a Data-Driven Test Case

  1. Open the GMO application at http://demo.borland.com/gmopost/.
  2. Start Silk Test Classic and click File > Open.
  3. Browse to <SilkTest installation directory>\examples and open usability.t.
  4. Click Workflows > Data Driven to turn on the Data Driven Workflow bar, if it’s not already visible.
  5. On the Data Driven Workflow bar, click Data Drive Testcase.
  6. On the Select Testcase dialog box, double-click testcase1.
  7. On the Specify Data Driven Script dialog box, click Create a new file/Overwrite an existing file and browse to the <SilkTest installation directory>\examples directory. Give the file the name gentest1, which means you will have to change the default new name.
  8. Click Save to save the new file and then click OK when you return to the Specify Data Driven Script dialog box. Silk Test Classic automatically applies the .g.t file extension to that file.
  9. On the Select Data Source dialog box, specify the location of the database you are using to supply values for the data-driven test case. Accept the default data source, Silk DDA Excel. At the Select Workbook field, click Browse and select the <SilkTest installation directory>\examples\TestExcel.xls and click Open. Click OK on the Select Data Source dialog.
  10. At the Select Workbook text box, click Browse, select the <SilkTest installation directory>\examples\TestExcel.xls, and click Open.
  11. Click OK on the Select Data Source dialog box.
  12. On the Specify Data Driven Testcase dialog box, click OK to indicate that you want to add a new test case named DD_testcase1 to the gentest1.g.t file you have created.
  13. The Find/Replace Values dialog box opens; close this dialog box because you are not using it for this exercise. Silk Test Classic loads the database tables and columns and then displays the gentest1.g.t file in the 4Test Editor.
Note: There is a section at the top of your file that is collapsed; it contains the code that Silk Test Classic writes including the DSN connection, a sample record, and other necessary information:
[+] // *** DATA DRIVEN ASSISTANT Section (!! DO NOT REMOVE !!) ***
To see the code that Silk Test Classic creates, click [+] to expand that section. Do not edit any of the information contained in this section.