Monday, March 24, 2008

Winrunner questions from Interviewer point of view

Explain WinRunner testing process?WinRunner testing process involves six main stagesi. Create GUI Map File so that WinRunner can recognize the GUI objects in the application being testedii. Create test scripts by recording, programming, or a combination of both. While recording tests, insert checkpoints where you want to check the response of the application being tested.iii. Debug Test: run tests in Debug mode to make sure they run smoothlyiv. Run Tests: run tests in Verify mode to test your application.v. View Results: determines the success or failure of the tests.vi. Report Defects: If a test run fails due to a defect in the application being tested, you can report information about the defect directly from the Test Results window.
What is contained in the GUI map?- WinRunner stores information it learns about a window or object in a GUI Map. When WinRunner runs a test, it uses the GUI map to locate objects. It reads an object’s description in the GUI map and then looks for an object with the same properties in the application being tested. Each of these objects in the GUI Map file will be having a logical name and a physical description.
- There are 2 types of GUI Map files.i. Global GUI Map file: a single GUI Map file for the entire applicationii. GUI Map File per Test: WinRunner automatically creates a GUI Map file for each test created.
How does WinRunner recognize objects on the application?WinRunner uses the GUI Map file to recognize objects on the application. When WinRunner runs a test, it uses the GUI map to locate objects. It reads an object’s description in the GUI map and then looks for an object with the same properties in the application being tested.
Have you created test scripts and what is contained in the test scripts?Yes I have created test scripts. It contains the statement in Mercury Interactive’s Test Script Language (TSL). These statements appear as a test script in a test window. You can then enhance your recorded test script, either by typing in additional TSL functions and programming elements or by using WinRunner’s visual programming tool, the Function Generator.
How does WinRunner evaluates test results?Following each test run, WinRunner displays the results in a report. The report details all the major events that occurred during the run, such as checkpoints, error messages, system messages, or user messages. If mismatches are detected at checkpoints during the test run, you can view the expected results and the actual results from the Test Results window.
Have you performed debugging of the scripts?Yes, I have performed debugging of scripts. We can debug the script by executing the script in the debug mode. We can also debug script using the Step, Step Into, Step out functionalities provided by the WinRunner.
How do you run your test scripts?We run tests in Verify mode to test your application. Each time WinRunner encounters a checkpoint in the test script, it compares the current data of the application being tested to the expected data captured earlier. If any mismatches are found, WinRunner captures them as actual results. 1. Where did you learn WinRunner and TestDirector?
If they say it was in a mercury class, ask if they can show you theircertificate of completion. If they say no, let them know you will verify itwith Mercury.
2. Have you ever created a start-up script?
If they answer “yes”, ask themwhat was in it and how they got WR to execute the start-up script when WR isinvoked.
They should answer something like this, “In the start-up script, we loaded allthe gui maps for the application, any library files we needed, and any customgui object mapping we have to do. We also loaded global variables and systemvariables here. The startup script location is added to the WR .ini file,wrun.ini located under the windows or winnt directory as wrun.ini”
3. What is the difference between writing a function and writing a script?
They should mention some of these things:1. A function goes into a “compiled module”, a script does not.2. A function follows strict “c” syntax. For instance, you have to declareall variables created and used in the function. In a script you do not.
4. What is the difference between “set_window” and “win_activate”.?When would you use “set_window” and when would you use “win_activate”?win_activate has the format win_activate(window);. The win_activate functionmakes the specified window the active window by bringing it into focus andraising it to the top of the display. (It is the equivalent to clicking on thewindow banner)
Set_window has the following format: set_window(window,[time]);The set_window function directs input to the correct application window. Thisdirects the GUI map to this window. It also sets the scope for objectidentification in the GUI map.
The most important difference is that set_window has a timing option.WinRunner will wait a maximum of the number used in the function, PLUS thesystem set timeout, to wait for the window to appear. Win_activate assumes thewindow is already on the desktop and has no timing option.

No comments: