SilkTest and Excel
SilkTest and Excel
DB_Tester Functions
with an Excel
Spreadsheet
INTRODUCTION
It is often desirable to be able to store test data in an easily accessible environment.
Standard ASCII files can fit that bill. However, if one wants more power for getting data into
and out of a test data structure, Segue’s Silk Test’s DB Tester functions are an excellent way of
accessing information in database. Additionally, for even greater ease-of-user, an Excel
spreadsheet can be used as a database provided that proper conditions are met.
This white paper will not cover all of the intricacies of SQL statements. There are plenty
of on-line guides to SQL. Here are a few:
o http://www.sqlcourse.com/
o http://w3.one.net/~jhoffman/sqltut.htm
E S TA B L I S H I N G AN E X C E L D ATA B A S E
One might think that putting data into a Microsoft Excel spreadsheet and saving the
spreadsheet would be all that’s needed. Unfortunately, this is not the case.
It might be logical if each spreadsheet contained in a Microsoft Excel workbook were
considered a table in the database. However, Microsoft designed Excel differently. In the
following example, the worksheet named “Ages” is not a database table, just a worksheet.
In order to make the data into a table, you must select the desired region of the
spreadsheet or select the entire spreadsheet and name the region. This is accomplished by enter a
name for the new region into the Name Box in Excel. If you plan on your database table
contents growing, it may be best to make the entire spreadsheet the named region.
Name Box
Any time you want to select the entire region later, all you have to do is select it from the
Name Box PopupList. The entire named region will be selected.
Save your Excel workbook wherever you like. But remember where it is.
E S TA B L I S H I N G AN O D B C D ATA S O U R C E
SilkTest’s DB Tester functions require that the database have an ODBC Data Source.
In order to make your Excel spreadsheet an ODBC Data Source, launch the ODBC
Manager from Control Panel.
After clicking Finish you’re not really finished. You will then be prompted for more
information about the Excel database you’re trying to establish a connection to.
Give your data source a name (recommended not to use spaces in your name) and then
use the Select Workbook PushButton to browse to the database you just selected.
Click OK.
Here’s an example of a simple query on the spreadsheet and ODBC Data Source created
earlier in this document.