How do you create ODBC query?
We can create ODBC query using the
database checkpoint wizard. It provides with option to create an SQL file that
uses an ODBC DSN to connect to the database. The SQL File will contain the
connection string and the SQL statement.
How do you record a data driven test?
We can create a data-driven testing
using data from a flat file, data table or a database.
Using Flat File: we actually
store the data to be used in a required format in the file. We access the file
using the File manipulation commands, reads data from the file and assign the
variables with data.
Data Table: It is an excel
file. We can store test data in these files and manipulate them. We use the ‘ddt_*’
functions to manipulate data in the data table.
Database: we store test data in
the database and access these data using ‘db_*’ functions.
How do you convert a database file to a text file?
You can use Data Junction to create
a conversion file which converts a database to a target text file.
How do you parameterize database check points?
When you create a standard database
checkpoint using ODBC (Microsoft Query), you can add parameters to an SQL
statement to parameterize the checkpoint. This is useful if you want to create a
database checkpoint with a query in which the SQL statement defining your query
How do you create parameterize SQL commands?
A parameterized query is a query in
which at least one of the fields of the WHERE clause is parameterized, i.e., the
value of the field is specified by a question mark symbol ( ? ). For example,
the following SQL statement is based on a query on the database in the sample
Flight Reservation application:
Flights.Flight_Number, Flights.Day_Of_Week FROM Flights Flights WHERE (Flights.Departure=?)
SELECT defines the columns to include in
FROM specifies the path of the database.
WHERE (optional) specifies the conditions, or
filters to use in the query.
Departure is the parameter that represents the
departure point of a flight.
Day_Of_Week is the parameter that
represents the day of the week of a flight.
When creating a database
checkpoint, you insert a db_check statement into your test script. When you
parameterize the SQL statement in your checkpoint, the db_check function
has a fourth, optional, argument: the parameter_array argument. A
statement similar to the following is inserted into your test script:
db_check("list1.cdl", "dbvf1", NO_LIMIT,
The parameter_array argument will
contain the values to substitute for the parameters in the parameterized