Data Driven Testing
Both tools support the notion of data-driven tests, but implement this feature differently: •
SilkTest’s implementation is built around an array of user defined
records. A record is adata structure defining an arbitrary number of
data items which are populated with valueswhen the array is initialized
[statically or at runtime]. Non-programmers can think of anarray of
records as a memory resident spreadsheet of X number of rows which
contain Ynumber columns where each row/column intersection contains a
data item.The test code, as well as the array itself, must be hand
coded. It is also possible to populatethe array each time the test is
run by extracting the array’s data values from an ODBC compliant
database, using a series of built-in SQL function calls. The test then
iteratesthrough the array such that each iteration of the test uses the
data items from the next recordin the array to drive the test or
provide expected data values. •
WinRunner’s implementation is built around an Excel compatible
spreadsheet file of Xnumber of rows which contain Y number of columns
where each row/column intersectioncontains a data item. This
spreadsheet is referred to as a Data Table.The test code, as well as
the Data Table itself, can be created with hand coding or the use ofthe
DataDriver visual recorder. It is also possible to populate a Data
Table file each time thetest is run by extracting the table’s data
values from an ODBC compliant database using aWinRunner wizard
interfaced to the Microsoft Query application.. The test then
iteratesthrough the Data Table such that each iteration of the test
uses the data items from the nextrow in the table to drive the test or
provide expected data values.Both tools also support the capability to
pass data values into a testcase for a more modestapproach to data
driving a test.
|