You can add a runtime database record checkpoint to your test in order to compare information displayed in your application during a test run with the current value(s) in the corresponding record(s) in your database. You add runtime database record checkpoints by running the Runtime Record Checkpoint wizard. When you are finished, the wizard inserts the appropriate db_record_check statement into your script.
Note that when you create a runtime database record checkpoint, the data in the application and in the database are generally in the same format. If the data is in different formats, you can follow the instructions in “Comparing Data in Different Formats” to create a runtime database record checkpoint. Note that this feature is for advanced WinRunner users only.
Using the Runtime Record Checkpoint Wizard
The Runtime Record Checkpoint wizard guides you through the steps of defining your query, identifying the application controls that contain the information corresponding to the records in your query, and defining the success criteria for your checkpoint.
To open the wizard, select Insert > Database Checkpoint > Runtime Record Check.
Define Query Screen
The Define Query screen enables you to select a database and define a query for your checkpoint. You can create a new query from your database using Microsoft Query, or manually define an SQL statement
You can choose from the following options:
Specify SQL Statement Screen
The Specify SQL Statement screen enables you to manually specify the database connection string and the SQL statement.
Enter the required information:
The Match Database Field screen enables you to identify the application control or text in your application that matches the displayed database field. You repeat this step for each field included in your query. This screen includes the following options:
(Displayed only when the Select text from a Web page check box is cleared.)
(Displayed only when the Select text from a Web page check box is checked.)
(Displayed only when the Select text from a Web page check box is selected.)
The Matching Record Criteria screen enables you to specify the number of matching database records required for a successful checkpoint.
When you click Finish on the Runtime Record Checkpoint wizard, a db_record_check statement is inserted into your script.
Comparing Data in Different Formats
Suppose you want to compare the data in your application to data in the database, but the data is in different formats. You can follow the instructions below to create a runtime database record checkpoint without using the Runtime Record Checkpoint Wizard. Note that this feature is for advanced WinRunner users only.
For example, in the sample Flight Reservation application, there are three radio buttons in the Class box. When this box is enabled, one of the radio buttons is always selected. In the database of the sample Flight Reservation application, there is one field with the values 1, 2, or 3 for the matching class.
To check that data in the application and the database have the same value, you must perform the following steps:
When prompted, instead of pointing to your application control with the desired value, point to the edit field where you entered the desired calculated value.
Example of Comparing Different Data Formats in a Runtime Database Record Checkpoint
The following excerpts from a script are used to check the Class field in the database against the radio buttons in the sample Flights application. The steps refer to the instructions.step 1 step 2
WinRunner Related Interview Questions
|SILK TEST Interview Questions||LoadRunner Interview Questions|
|WinRunner Interview Questions||HTML Interview Questions|
|QTP Interview Questions||Manual Testing Interview Questions|
|OpenStack Interview Questions||Automation Testing Interview Questions|
|API testing Interview Questions||Rational robot Interview Questions|
|Selenium IDE Interview Questions||Performance Testing Interview Questions|
|Test Director Interview Questions|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.