-
Explain Get Text checkpoint from object/window with syntax?
We use obj_get_text (<logical_name>, <out_text>) function to get the text from an object b. We use win_get_text (window, out_text [, x1, y1, x2, y2]) function to get the text from a window.
-
How do you handle pop-up exceptions?
A pop-up exception Handler handles the pop-up messages that come up during the execution of the script in the AUT. TO handle this type of exception we make WinRunner learn the window and also specify a handler to the exception. It could be i. Default actions: WinRunner clicks the OK or Cancel button in the pop-up window, or presses Enter on the keyboard. To select a default handler, click the...
-
How do you maintain the document information of the test scripts?
Before creating a test, you can document information about the test in the General and Description tabs of the Test Properties dialog box. You can enter the name of the test author, the type of functionality tested, a detaileddescription of the test, and a reference to the relevant functional specifications document.
-
What do you verify with the GUI checkpoint for multiple objects and what command it generates, explain syntax?
To create a GUI checkpoint for two or more objects: i. Choose Create > GUI Checkpoint > For Multiple Objects or click the GUI Checkpoint for Multiple Objects button on the User toolbar. If you are recording in Analog mode, press the CHECK GUI FOR MULTIPLE OBJECTS softkey in order to avoid extraneous mouse movements. The Create GUI Checkpoint dialog box opens. ii. Click the Add button. The...
-
What do you verify with the GUI checkpoint for object/window and what command it generates, explain syntax?
You can create a GUI checkpoint to check a single object in the application being tested. You can either check the object with its default properties or you can specify which properties to check. b. Creating a GUI Checkpoint using the Default Checks i. You can create a GUI checkpoint that performs a default check on the property recommended by WinRunner. For example, if you create a GUI checkpoint...
-
What are the steps of creating a data driven test?
The steps involved in data driven testing are: i. Creating a test ii. Converting to a data-driven test and preparing a database iii. Running the test iv. Analyzing the test results.
-
How do you handle object exceptions?
During testing, unexpected changes can occur to GUI objects in the application you are testing. These changes are often subtle but they can disrupt the test run and distort results. b. You could use exception handling to detect a change in property of the GUI object during the test run, and to recover test execution by calling a handler function and continue with the test execution
-
How do you comment your script?
We comment a script or line of script by inserting a ‘#’ at the beginning of the line.
-
Which TSL function you will use to compare two files?
We can compare 2 files in WinRunner using the file_compare function. Syntax: file_compare (file1, file2 [, save file]);
-
What do you verify with the bitmap checkpoint for screen area and what command it generates, explain syntax?
You can define any rectangular area of the screen and capture it as a bitmap for comparison. The area can be any size: it can be part of a single window, or it can intersect several windows. The rectangle is identified by the coordinates of its upper left and lower right corners, relative to the upper left corner of the window in which the area is located. If the area intersects several windows...
-
Explain Get Text checkpoint from screen area with syntax?
We use win_get_text (window, out_text [, x1, y1, x2, y2]) function to get the text from a window.
-
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: i. SELECT Flights.Departure, Flights.Flight_Number, Flights.Day_Of_Week FROM Flights Flights...
-
What do you verify with the sync point for object/window property and what command it generates, explain syntax?
Synchronization compensates for inconsistencies in the performance of your application during a test run. By inserting a synchronization point in your test script, you can instruct WinRunner to suspend the test run and wait for a cue before continuing the test.b. You can a synchronization point that instructs WinRunner to wait for a specified object or window to appear. For example, you can...
-
What check points you will use to read and check text on the GUI and explain its syntax?
You can use text checkpoints in your test scripts to read and check text in GUI objects and in areas of the screen. While creating a test you point to an object or a window containing text. WinRunner reads the text and writes a TSL statement to the test script. You may then add simple programming elements to your test scripts to verify the contents of the text. b. You can use a text checkpoint...
-
How do you handle TSL exceptions?
A TSL exception enables you to detect and respond to a specific error code returned during test execution. b. Suppose you are running a batch test on an unstable version of your application. If your application crashes, you want WinRunner to recover test execution. A TSL exception can instruct WinRunner to recover test execution by exiting the current test, restarting the application, and continuing...
-
Write and explain switch command?
A switch statement enables WinRunner to make a decision based on an expression that can have more than two values. It has the following syntax: switch (expression ) { case case_1: statements case case_2: statements case case_n: statements default: statement(s) } b. The switch statement consecutively evaluates each case expression until one is found that equals the initial expression. If...
-
Write and explain decision making command?
You can incorporate decision-making into your test scripts using if/else or switch statements. i. An if/else statement executes a statement if a condition is true; otherwise, it executes another statement. It has the following syntax: if ( expression ) statement1; [ else statement2; ] expression is evaluated. If expression is true, statement1 is executed. If expression1 is false, statement2...
-
What do you verify with the bitmap check point for object/window and what command it generates, explain syntax?
You can check an object, a window, or an area of a screen in your application as a bitmap. While creating a test, you indicate what you want to check. WinRunner captures the specified bitmap, stores it in the expected results folder (exp) of the test, and inserts a checkpoint in the test script. When you run the test, WinRunner compares the bitmap currently displayed in the application being...
-
Explain the following commands:
db_connect i. to connect to a database db_connect(<session_name>, <connection_string>); b. db_execute_query i. to execute a query db_execute_query ( session_name, SQL, record_number ); record_number is the out value. c. db_get_field_value i. returns the value of a single field in the specified row_index and column in the session_name database session. db_get_field_value ( session_name,...
-
What are the three modes of running the scripts?
WinRunner provides three modes in which to run tests—Verify, Debug, and Update. You use each mode during a different phase of the testing process. i. Verify 1. Use the Verify mode to check your application. ii. Debug 1. Use the Debug mode to help you identify bugs in a test script. iii. Update 1. Use the Update mode to update the expected results of a test or to create a new expected...
Winrunner Interview Questions
Ans