|
Test Recorder about Data Handlers
Mercury WinRunner FAQ
(Continued from previous question...)
Test Recorder about Data Handlers
Test Data can be accessed by built-in data functions. Some of the common practices that would help a automation tester to use the data-tables in a proper fashion.
1. SINGLE DATA TABLE: By default every automation tool gives the data-table as an input file can be created using a tool wizard or sometimes potentially creating using a character-separated file. This wizard would help us in creating a Data sheet with its column names from the objects used in the test objects. With this concept, we can evolve a technique to load any File or manipulate the AUT by predefined set of cases.
2. Multiple Data Table: It's a common practice to use the single default data file for many test scripts. Often the usage of data tables is restricted to one file at a moment. Handling multiple data tables is not advisable and incur a lot of redundant code to handle the table manipulations. As a general practice the data file is mapped to every script. This mean every Test Script will have a unique data table for easier data access and also the data operation will become easy to maintain.
In Compuware's QARun following is the code used.
// Run a test script
TestData ("CreditLogon.csv")
Call TestFunc1
For e.g in Mercury Interactive's WinRunner,
call_close "Test_Script1" (dTable1.xls) ;
#
call_close "Test_Script2" (dTable2.xls);
3. Data files should be initialized before starting by way of simple tool commands by transferring a standard template data table to the actual template. By this practice the need of deleting data after every run in the data table can be avoided.
In Mercury Interactive's WinRunner the piece of code below explains the data table Initialization.
#/***************Data Table Initialization*****************
ddt_open(Template, DDT_MODE_READ);
ddt_open(dTable, DDT_MODE_READWRITE);
ddt_export(Template,dTable);
ddt_save(dTable);
ddt_close(dTable);
ddt_close(Template);
ddt_close_all_tables();
#/***************Data Table Initialization*****************
4. Dynamic loading of data from the Data base operation is the most advisable practice to be followed, but yet handling the db operations with some meticulous programming would always benefit the tester avoiding a variety of operational hazard and reducing the data access time for remote server database to the local data table.
Some of the tips, which need to be followed in the WinRunner TSL handling when we use the db commands.
Set the row before writing the data values in to the data-table.
i.e., Use the following TSL Command
public count;
count = 1;
ddt_set_row (dTable, count);
Now we use the set value by row command for writing the values in it
ddt_set_val_by_row (dTable, count, "CTS_EMP_NAME", value);
Need less to mention here, but to avoid confusion it is better to use the same column names as found in the Data Base table. And never insert any columns before or after or in between the column names in the WinRunner data table. It is a better practice to load the data table with the data as found in the Backend database.
Fig 1. shows the Automation Test Plan, its pre-requisites, Initial Conditions and the Test repository. This figure also gives the idea of building any Automation Test plan.
(Continued on next question...)
Other Interview Questions
- For new users, how to use WinRunner to test software applications automately ?
- How to use WinRunne to check whether the record was updated or the record was delelte or the record was inserted or not?
- After clicking on "login" button, they opens other windows of the web application, how to check that page is opened or not
- Winrunner testscript for checking all the links at a time
- How to get the resolution settings
- WITHOUT the GUI map, use the phy desc directly....
- What are the three modes of running the scripts?
- How do you handle unexpected events and errors?
- How do you handle pop-up exceptions?
- How do you handle TSL exceptions?
- How to write an email address validation script in TSL?
- How to have winrunner insert yesterdays date into a field in the application?
- How can withwin runner to make single scripts which supports multiple languages?
- How to use a regular _expression in the physical description of a window in the GUI map?
- How to force WR to learn the sub-items on a menu...?
- How to check property of specific Icon is highlighted or not?
- BitMap or GUI Checkpoints
- How to to get the information from the status bar without doing any activity/click on the hyperlink?
- Object name Changing dynamically?
- Text Field Validations
- Loads multiple giumaps into an array
- Read and write to the registry using the Windows API functions
- How to break infinite loop
- User-defined function that would write to the Print-log as well as write to a file
- How to do text matching?
- the MSW_id value sometimes changes, rendering the GUI map useless
- Having the DB Check point, its able to show the current values in form but its not showing the values that saved in the table
- Increas Capacity Testing
- Stateful testing
- Privilage testing
- Speed testing
- Boundary Test
- Boundary timeing testing
- Regression testing
- CONDITIONS DURING WHICH REGRESSION TESTS MAY BE RUN
- Database Testing
- How do you find an object in an GUI map?
- What different actions are performed by find and show button?
- How do you identify which files are loaded in the GUI map?
- How do you modify the logical name or the physical description of the objects in GUI map?
- When do you feel you need to modify the logical name?
- When it is appropriate to change physical description?
- How WinRunner handles varying window labels?
- What is the purpose of regexp_label property and regexp_MSW_class property?
- How do you suppress a regular expression?
- How do you copy and move objects between different GUI map files?
- How do you select multiple objects during merging the files?
- How do you clear a GUI map files?
- How do you filter the objects in the GUI map?
- How do you configure GUI map?
- What is the purpose of GUI map configuration?
- How do you make the configuration and mappings permanent?
- What is the purpose of GUI spy?
- Have you used WinRunner in your project?
- Explain WinRunner testing process?
- What is contained in the GUI map?
- How does WinRunner recognize objects on the application?
- Have you created test scripts and what is contained in the test scripts?
- How does WinRunner evaluates test results?
- Have you performed debugging of the scripts?
- How do you run your test scripts?
- How do you analyze results and report the defects?
- What is the purpose of different record methods 1) Record 2) Pass up 3) As Object 4) Ignore.?
- Mercury WinRunner FAQ
- What are the virtual objects and how do you learn them?
- What are the two modes of recording?
- What is a checkpoint and what are different types of checkpoints?
- What are data driven tests?
- What are the synchronization points?
- What is parameterizing?
- How do you maintain the document information of the test scripts?
- What do you verify with the GUI checkpoint for single property and what command it generates, explain syntax?
- What do you verify with the GUI checkpoint for object/window and what command it generates, explain syntax?
- What is the use of Test Director software?
- How you integrated your automated scripts from TestDirector?
- What are the different modes of recording?
- What is the purpose of loading WinRunner Add-Ins?
- What are the reasons that WinRunner fails to identify an object on the GUI?
- What do you mean by the logical name of the object.
- If the object does not have a name then what will be the logical name?
- What is the different between GUI map and GUI map files?
- How do you view the contents of the GUI map?
- What do you verify with the GUI checkpoint for multiple objects and what command it generates, explain syntax?
- What information is contained in the checklist file and in which file expected results are stored?
- What do you verify with the bitmap check point for object/window and what command it generates, explain syntax?
- What do you verify with the bitmap checkpoint for screen area and what command it generates, explain syntax?
- What do you verify with the database checkpoint default and what command it generates, explain syntax?
- How do you handle dynamically changing area of the window in the bitmap checkpoints?
- What do you verify with the database check point custom and what command it generates, explain syntax?
- What do you verify with the sync point for object/window property and what command it generates, explain syntax?
- What do you verify with the sync point for object/window bitmap and what command it generates, explain syntax?
- What is the extension of gui map file?
- How do you find an object in an GUI map?
- What different actions are performed by find and show button?
- How do you identify which files are loaded in the GUI map?
- How do you modify the logical name or the physical description of the objects in GUI map?
- When do you feel you need to modify the logical name?
- When it is appropriate to change physical description?
- How WinRunner handles varying window labels?
- What is the purpose of regexp_label property and regexp_MSW_class property?
- What is the purpose of obligatory and optional properties of the objects?
- When the optional properties are learned?
- What is the purpose of location indicator and index indicator in GUI map configuration?
- How do you handle custom objects?
- What is the name of custom class in WinRunner and what methods it applies on the custom objects?
- In a situation when obligatory and optional both the properties cannot uniquely identify an object what method WinRunner applies?
- What do you verify with the sync point for screen area and what command it generates, explain syntax?
- How do you edit checklist file and when do you need to edit the checklist file?
- When you create GUI map do you record all the objects of specific objects?
- What is the purpose of set_window command?
- How do you load GUI map?
- What is the disadvantage of loading the GUI maps through start up scripts?
- How do you unload the GUI map?
- What actually happens when you load GUI map?
- What is the purpose of the temp GUI map file?
- How do you suppress a regular expression?
- How do you copy and move objects between different GUI map files?
- How do you select multiple objects during merging the files?
- How do you edit the expected value of an object?
- How do you modify the expected results of a GUI checkpoint?
- How do you handle ActiveX and Visual basic objects?
- How do you create ODBC query?
- How do you record a data driven test?
- How do you convert a database file to a text file?
- How do you parameterize database check points?
- How do you create parameterize SQL commands?
- What check points you will use to read and check text on the GUI and explain its syntax?
- How to get Text from object/window ?
- How to get Text from screen area ?
- Which TSL functions you will use for Searching text on the window
- What are the steps of creating a data driven test?
- How to use data driver wizard?
- How do you clear a GUI map files?
- How do you filter the objects in the GUI map?
- How do you configure GUI map?
- What is the purpose of GUI map configuration?
- How do you make the configuration and mappings permanent?
- What is the purpose of obligatory and optional properties of the objects?
- When the optional properties are learned?
- How do you handle object exceptions?
- What is a compile module?
- What is the difference between script and compile module?
- How do you write messages to the report?
- What is a command to invoke application?
- What is the purpose of tl_step command?
- Which TSL function you will use to compare two files?
- What is the use of function generator?
- What is the use of putting call and call_close statements in the test script?
- What is the use of treturn and texit statements in the test script?
- What does auto, static, public and extern variables means?
- How do you declare constants?
- How do you declare arrays?
- How do you load and unload a compile module?
- Why you use reload function?
- Write and explain compile module?
- How you used WinRunner in your project?
- Explain WinRunner testing process?
- What is contained in the GUI map?
- How does WinRunner recognize objects on the application?
- Have you created test scripts and what is contained in the test scripts?
- How does WinRunner evaluate test results?
- Have you performed debugging of the scripts?
- How do you run your test scripts?
- How do you analyze results and report the defects?
- What is the use of Test Director software?
- Have you integrated your automated scripts from TestDirector?
- What is the purpose of loading WinRunner Add-Ins?
- What is meant by the logical name of the object?
- If the object does not have a name then what will be the logical name?
- What is the different between GUI map and GUI map files?
- How do you view the contents of the GUI map?
- How do you view the contents of the GUI map?
- How to compare value of textbox in WinRunner?
- Winrunner with combo box
- WinRunner: How to Set GUI file's searchpath?
- WinRunner: How to check the tab order?
- WinRunner: Why "Bitmap Check point" is not working with Framework?
- How to Plan automation testing to to impliment keyword driven methodology in testing automation using winrunner8.2?
- How does winrunner invoke on remote machine?
- WinRunner: How to connect to ORACLE Database without TNS?
- Have to verify against excel spread sheet where report descriptions are stored . please guide "how to proceed?
- WinRunner: While invoking Win Runner, the error message displays
- WinRunner: How to use data driven technology in GUI Check points for Objects ?
- How to handle 'Timeout expired' problem in WinRunner when dealingwith Complex SQL Queries??
- WinRunner: How to generate user name uniquely?
- Unable to print a newline character [\n] in file, any solution?
- How to define the variable in script that have stored in excel sheet using winrunner?
- WinRunner: How to Change physical description?
- Is there any function in winrunner which will clear the history of the browser?
- WinRunner: How to read dynamic names of html_link
- Is it possible to use winrunner for testing .aspx forms or dotnet forms?
- Can WinRunner put the test results in a file?
- WinRunner: What is the difference between virtual object and custom object?
- How to create an Object of an Excel File in WinRunner?
- How to use values returned by VB script in winrunner?
- WinRunner: What tag is required to allow me to identify a html table?
- WinRunner: How to work with file type using WinRunner functions?
- WinRunner: Do Java Add-Ins required for Web based Application?
- How to generate unique name?
- WinRunner: How to access the last window brought up?
- WinRunner: How to identifying dynamic objects in web applications ?
- WinRunner: How to delete files from drive?
- WinRunner: Could do we start automation before getting the build?
- How to create a GUI map dynamically?
- WinRunner script for Waitbusy
- WinRunner script to get Min and Max
- Type special chars in WinRuneer
- Clean up script/function from WinRunner
- How to convert variable from ascii to string?
- The script for WinRunner Database Functions
- How to get time duration in millisecond in WinRunner?
- Working with QTP and work on web application which is developed on .Net. ...
- How to verify the animations(gif files) present in the applications using WinRunner?
- WinRunner: Should I sign up for a course at a nearby educational institution?
- How important is QTP in automated testing, does only with manaul testing (Test Director) is enough for testing. Or do we require automated tools in each and every projects. What are the different advantages of the QTP?
- Tell me about the TestDirector®
- What is a backward compatible design?
- How to get the compiler to create a DLL ?
- How to export DLL functions so that WinRunner could recognise them?
- How to pass parameters between WinRunner and the DLL function?
- Why Have TSL Test Code Conventions
- Test Script Naming
- Test script Directory structure:
- All the TSL script files should begin with a comment that lists the Script name, Description of the script,
- Creating C DLLs for use with WinRunner
- Creating C++ DLLs for use with WinRunner
- Creating MFC DLLs for use with WinRunner
- Creating MFC Dialog DLLs for use with WinRunner
- Loading and Calling the Above DLLs from WinRunner
- Definition of Tests
- Test Recorder about Object Vs Actions
- Test Recorder about Generic Test Environment Options
- Test Recorder about Test Properties
- Test Recorder about Script Environment
- Test Recorder about Script Environment: Automation Inits ()
- Test Recorder about Script Environment: Test Scripts Elements:
- Test Recorder about Control Points
- Test Recorder about Control Points - If. … Else:
- Test Recorder about Data Access
- Test Recorder about Control Points - Check Points
- Test Recorder about Data Handlers
- Online Vs Batch Execution - Online Test Scripts How do we use Online Scripts?
- Online Vs Batch Execution - User Input . Where should the input_dialog_box function exist - in the driver file or in individual script?
- Online Vs Batch Execution - Test Results . Is it necessary to pass results back to the driver script even if scripts are not dependent? How should the results be passed back?
- Online Vs Batch Execution - TRe-Runnable Tests
- Online Vs Batch Execution - TRe-Runnable Tests Calling a driver file from within a driver file? Is this advisable?
- Online Vs Batch Execution - Functions & Compiled Modules-Load Library
- Online Vs Batch Execution - Functions & Compiled Modules-Data Fetch Should we open and read from data table in driver scripts? Why or why not?
- Online Vs Batch Execution - Functions & Compiled Modules - User Defined Functions Creating user-defined libraries and functions: How to access if a script should be made a function - What are the pros and cons of making a script a function versus just using it as a script and calling it from the driver file?
- WinRunner: Test Director
- WinRunner: Test Director - Test Repositories
- WinRunner: Test Director - Steps to take before creating Test Projects:
- WinRunner: Test Director - Set Up Recommendations:
- WinRunner: Test Director - Documentation Standards:
- WinRunner: Test Director - Naming Conventions:
- WinRunner: Test Director - Importing WinRunner tests into Test Director
- WinRunner: Test Director - How to delete Mercury Toolbar out of MS Word
- WinRunner: Other Test Director Features
- WinRunner: How to see the internal version of WebTest in your machine?
- WinRunner: Web sites contain ActiveX controls
- WinRunner: Web sites contain Java applets
- WinRunner: Steps to take before recording:
- WinRunner: Libraries Needed for automation:
- WinRunner: Commands and Checkpoint Verification information for Web:
- WinRunner: How to Structure tests for Web:
- WinRunner: Recording tips:
- WinRunner: Documentation:
- WinRunner: Naming Conventions:
- WinRunner: When Running Scripts:
- Explain Get Text checkpoint from object/window with syntax?
- Explain Get Text checkpoint from screen area with syntax?
- Explain Get Text checkpoint from selection (web only) with syntax?
- Explain Get Text checkpoint web text checkpoint with syntax?
- What are the steps of creating a data driven test?
- How to manage text using WinRunner
- WinRunner: How to test to see if the window is maximized
- WinRunner: How to determine which window you are on:
- WinRunner: How to test if a link exists and is valid
- WinRunner: How to select a link on a web page
- WinRunner: How to check a property of an object on the web page
- WinRunner: Parameterization rules:
- WinRunner: Use the following templates to assist in your scripting
- WinRunner: The following script and dll provides WinRunner with perl-like regular expression search and match functions, to use with any GUI property, and add search and match functions.
- Every time there is a change in the Application Object I need to change the Object name and rerun the Test Script with a new object Name. Any suggestions on it?
- Coming up soon for the following Questions. If you know the answers, please email to us !
|