Wednesday, August 6, 2008


Oracle Certification Program Candidate Guide

1. Give one line answer about WR?

Ans. Win Runner helps you automate the testing process, from test development to execution. You can create adaptable and reusable test scripts that challenge the functionality of your application. Prior to a software release, you can run these tests in a single overnight run—enabling you to detect defects and ensure
superior software quality.

2. How do you define WR on your own?

Ans. WR can be used for functional testing for both the Desktop and Web based applications.

3. WR is suitable for which type of applications?

Ans. Win Runner is suitable for any type of application whether it is a desktop application, web application or a client server application.

4. What kind of applications WR suits?
Ans. Visual Basic, Power Builder, Active-X, Java and Web Applications

5. What are all the different types of recordings available in WR?
Ans. Win Runner has 2 types of recording modes namely
a. Context Sensitive Recording mode: identifies the GUI objects with their logical names

b. Analog Recording Mode: identifies the GUI objects based on the screen coordinates

6. When do you go for Context Sensitive and Analog? What's the difference between them?
Ans. Analog is opted when we perform GUI Testing and Context sensitive for Functionality testing.

7. What's the WR version no you used for your applications?
Ans. I have been working with Win Runner Version Number 7.0.

8. What is Module? What's Compiled Module?
Ans. Compiled modules are libraries of frequently used functions. You can save user defined functions in compiled modules and then call the functions from your test scripts.
A compiled module is a script containing a library of user-defined functions that you want to call frequently from other tests. When you load a compiled module,
its functions are automatically compiled and remain in memory. You can call them directly from within any test.
A module is a separable part of the system, which can be executed individually.

9. What are User Defined Functions? What are all the different types of Functions available in WR? What is Function? Types of Functions?
Ans. The Functions, which are written by the user to accomplish a specific functionality of his requirement, are called user-defined functions. The user-defined functions are stored in a compiled module so that any test can use this function after loading the compiled module.
The different types of functions in Win Runner are
a. Context Sensitive Functions
b. Analog Functions
c. Standard Functions
d. Custom Functions

10. Where do you use Private/Public function in your script?
Ans. A private function defined in a script can be used/called from only that script where as a public function can be used/called from any script.

11. How do you forcibly capture an Object using WR (when WR not able identify it)?
Ans. GUI Map Configuration

12. How TSL looks like? What are all the default files does WR generate when you create a script?
Ans. TSL looks like c language. In fact its c only. The files/folders that are generated by Win Runner when a script is created is db, exp and res.

13. What is the extension for the checkpoints?
Ans. The extension for the checklist are .ckl

14. How do you invoke an application using TSL?
Ans. Using Invoke application function.

15. What's the use of GUI Map Editor?
Ans. GUI Map Editor is used to record the objects in the Current Window of your application.

16. What's Data Driven Test?
Ans. Testing the same set of functionality using Win Runner with different inputs is called Data Driven Testing.

17. What's the File Format used in Data Table?
Ans. The File Format used for Data Table in Data Driven Testing in Win Runner is Microsoft Excel.

18. How do you link a Data Table in your script?
Ans. Using the ddt_open function in TSL we will be linking to the data table from our script.

19. What are all the different languages that can be called using TSL in between the scripts?
Ans. Mostly C language

20. What are all the Limitations & Advantages of WR?
Ans. You cannot install Win Runner 7.0 over network installations of previous versions of Win Runner.

Workaround: When performing a network installation of Win Runner, either remove installations of previous versions first, or install the new version in a different location.

Refer ReadMe document ….for more number of limitations

21. Where do you find that WR cannot be used for automation?
Ans. Automation is not preferred if the project size is small, manual intervention is necessary.

22. What is meant by Synchronization? How do you implement it in WR?
Ans. A synchronization point in your test script instructs Win Runner to
suspend running the test until the application being tested is ready, and then to
continue the test.

23. What is meant by Checkpoints? Types of Checkpoints? In what situation will you use it?
Ans. Checkpoints allow you to compare the current behavior of the application being
tested to its behavior in an earlier version. Various check points are

• GUI Checkpoint
• Bitmap Checkpoint
• Database Checkpoint
• Text checkpoints

24. How do you handle an Exception in WR? Types of Exception available in WR?
Ans. Exceptions in Win Runner are handled using the Exceptional Handling Concepts. And the different types of exceptions available in Win Runner are as follows:
• Pop-up exceptions: Instruct Win Runner to detect and handle the appearance of a specific window.
• TSL exceptions: Instruct Win Runner to detect and handle TSL functions that return a specific error code.
• Object exceptions: Instruct Win Runner to detect and handle a change in a property for a specific GUI object.
• Web exceptions: When the Web Test add-in is loaded, you can instruct Win Runner to handle unexpected events and errors that occur in your Web site during a test run.

25. How do you define an Exception for complete application or for a particular function?
Ans. We first define a TSL Function and then write a handler function in the compiled module for that exception and load that particular compiled module in the script in which you want to handle the exception through out the application…mostly in the main script.

26. What are all the different platforms that WR can be used?
Ans. Win Runner can be used only on Windows Platforms namely Windows 95, Windows 98, Windows NT, Windows 2000 and XP (wr ver 7.5).

27. What does GUI Spy mean?
Ans. GUI Spy is used to identify the properties of an object on the desktop.
You can use the Spy pointer to point to an object, and the GUI Spy displays the properties and their values in the GUI Spy dialog box. You can choose to view all the properties
of an object, or only the selected set of properties that Win Runner learns.

28. Can you test DB using WR? What are all the different DB Checkpoints that WR can support?
Ans. Yes we can check the database using Win Runner. There are all together 3 types of database checkpoints in Win Runner namely Default Database Checkpoint, Custom Database Checkpoint, and Runtime Database Checkpoint.

29. How do you set a Query to get/fetch data from the DB?
Ans. We can do that in two ways one is using the wizard and another is writing the script manually in win runner.
The second method is as follows:

#db_connect ("Test","DSN=test");
if (db_connect ("Test","DRIVER=SQL Server;SERiVER=RaniUID=sa;APP=Microsoft Development Environment;WSID=RANI;DATABASE=BugTracker;LANGUAGE=us_english;User Id=sa;PASSWORD=;")==E_OK)
query="SELECT UserID, UserName, TeamName, PhoneExt,LoginName, Password FROM UserDetailsi";
#db_check("list1.cdl", "dbvf1");
report_msg("The no of records returned is "&recordnum);
report_msg("Not Connected");

30. Apart from Record and Replay what else can be done using WR?
Ans. store and replay, customization based on user requirements, integration with test management tools like test director, etc..

31. What are different types of Test Run Modes?
Ans. Verify/Debug/Update Modes

32. When do you use Verify/Debug/Update Modes?
• Verify mode, to check your application. Win Runner compares the current response of your application to its expected response. Any discrepancies between the current and expected responses are captured and saved as verification results. When you finish running a test, by default the Test Results window opens for you to view the verification results.

• Debug mode, to debug your test script. Running a test in Debug mode is the same as running a test in Verify mode, except that debug results are always saved in the debug folder. Because only one set of debug results is stored, the Run Test dialog box does not open automatically when you run a test in Debug mode. Once you run a test in Debug mode, that remains the default run mode for the current WinRunner session until you activate another mode.

• Update mode, to update the expected results or to create a new expected results folder. For example, you could update the expected results for a GUI checkpoint that checks a push button, in the event that the push button default status changes from enabled to disabled. You may want to create an additional set of expected results. After a test has run in Update mode or been aborted, Verify automatically becomes the default run mode again. WinRunner saves expected results in the exp folder, overwriting any existing expected results.

33. When do you use Break Points?
Ans. A breakpoint marks a place in the test script where you want to pause a test run.
Breakpoints help to identify flaws in a script.

34. What's the role of GUI Map Editor?
Ans. Its connects logical name in the script to the physical attributes of the object in the GUI Map

35. What does Function Generator mean? (F7).
Ans. Function Generator is the repository with system-defined functions and also we can organize user-defined functions.

36. How do you load GUI Map?
From the GUI Map
Ans. using the GUI_load function or Editor

37. What is TSL? Which 4GL is it similar too?

Ans. TSL is WR scripting language, TSL is based on C language style, TSL has a set of different functions.

38. What databases can Test Director reside on?

39. Name a couple of standard web function found in the function generator? And explain their purpose.
Ans. Web_browser_invoke, web_image_click, web_obj_click, web_refresh,web_label_click,
Web_link_click, web_sync, web_url_valid

40. Explain data parameterization in WinRunner.(Refer UserGuide PgNo. 769)
Ans. Parameterization means dynamically passing different values to the application under test.

41. Explain the project tree in Test Director.

42. What's the purpose of the wrun.ini?
Ans. Stores the configuration related to winrunner’s editor

43. What are the two GUI Map modes available in WR?
Ans. The two modes of having a GUI Map file are :
GUI Map file per test mode : A new GUI Map file will be created for each script
Global GUI Map: A Single GUI Map file is used for all the scripts.

44. Big + of Winrunner over other market tools viz. silk, robot etc.?

45. How does Winrunner identify GUI Objects?
Ans. Winrunner will identify the GUI objects by its “Phy Desc” of particular object.

46. What is the use of rapid test script wizard?
Ans. The Rapid Test Script wizard systematically opens the windows in your application and learns the description of every GUI object. The wizard stores this information in a GUI map file.

47. How will you synchronize tests using WR? When should you synchronize? Synch.settings?
Ans. A synchronization point tells Winrunner to pause the test run in order to wait for a specified response in the application.

48. How do you check GUI objects?
Ans. We can check the GUI objects by GUI Check Points

49. How do you check a bitmap?
50. How do you program tests with TSL?
51. How do you run tests on a new version of WR?

52. What are data driven tests & How Do you create it in WR?
Ans. Testing the same set of functionality using WinRunner with different inputs is called Data Driven Testing. Data Driven test can be done through Wizard or manually writing the TSL script. Data driven is available in Tool menu.

53. How do you read text from an application?

54. What is a batch test? How do you program a batch test?
Ans.Running a set of scripts through CALL method is called batch test.

55. What happens when user interface changes?
Ans. When user interface changes WinRunner cannot find the objects which are stored in GUI map editor. Then we need to modify the physical description in the Gui Map Editor.

56. Does load testing possible using WR?
Ans. Yes.

57. Does WR help you in web testing?
Ans. Yes , Winrunner will help in web testing.

58. How do you manage test data, test result?

59. Any knowledge of Test Director?

60. Questions on TSL: How to generate Functions?

61. Running tests from the command line?
62. Last question (most imp.): Explain Winrunner Testing Modes?
Ans. Context Sensitive mode : which identifies the GUI objects with their logical names
Analog Mode identifies the objects with the screen coordinates
63. Write a function to retrieve the script name?
Ans. call_chain_get_attr (“testname", 0, testnameX); or

64. Can we read and assign the content of a text file to a variable.
str = "";

str = str & line;

65. How to clear the contents of a text file using WinRunner command?
Ans. Open the file with Write mode file_open (filename,FO_MODE_WRITE);

66. How to find a item is present in a list or not?
if (list_get_item_number("ListName", "ItemName", number) != E_OK)
report_msg("Not in list");
report_msg("Item is number " & number & " in list");

67. What are the scripts we can include in start up of WinRunner?

You should add the following types of statements to your startup test:
• Load statements, which load compiled modules containing user-defined functions that you frequently call from your test scripts.
• GUI_load statements, which load one or more GUI map files. This ensures that WinRunner recognizes the GUI objects in your application when you run tests.
• Statements that configure how WinRunner records GUI objects in your application, such as set_record_attr or set_class_map.
• an invoke_application statement, which starts the application being tested.
• Statements that enable WinRunner to generate custom record TSL functions when you perform operations on custom objects, such as add_cust_record_class.

68. How to round a number
public function round (num, place)
return sprintf ("%."place"f", num);

69. What is the difference between tl_return and tl_exit
tl_return is used at the end of a called test.

tl_exit is used at the end of normal test.

70. How to get focused html frame name?
if (win_exists("{MSW_class: html_frame, focused: 1}",1) == E_OK)
win_get_info("{MSW_class: html_frame, focused: 1}","html_name",name);

71. How to find whether the given sub string is present in a string.
z = index(y,"XXXX");
if (z == 0)
pause("No such string is found");
pause("String is found at position " & z);

72. What string of characters, when inserted into a string , will create a new line in a message displayed by a pause statement.

72. letters["a"] = "A";
letters["b"] = "B";
letters["c"] = "C";
How to write TSL statement that loops thro the array and displays the contents.
NOTE: You can't initialize another array.
73. How to use the ‘in’ operator in an Array?
Ans. in checks if the index is set for the array, not the assigned value of that array element. Thus if I have this array:
myArray[0] = "zero";
myArray[1] = "one";
myArray[2] = "two";
myArray[99] = "last one";
(0 in myArray) will return true, (5 in myArray) will return false (nothing yet assigned to myArray[5]). ("zero" in myArray) will return false (it's a value, not an index).

74. What is the difference between tl_step and report_msg?
Ans. tl_step will divide the script into sections and inserts a status message in the test report for the previous section. In tl_step we can set whether the action is passed or failed.
Report_msg is used to write a message in the test results.
75. What is the difference between win_activate and set_window functions?
Ans. win_activate method activates the window. Set_window specifies the window to receive subsequent input and (optionally) specifies the amount of time to wait for the specified window.

76. Without adding an object to the guimap file, can we execute the script on a particular object??
Ans. Yes. We can execute the script on a particular object without adding it to the gui map file by giving the physical description of the object directly in place of the logical name.

76. What is the difference between the set_window and _set_window functions?
Ans. The set_window specifies the window to receive the subsequent input and optionally specifies the amount of time to wait for the specified window. The parameter given for specifying the window is the windows logical name.
_set_window specifies a window to receive input. Here the window’s physical description is given to identify the window.
I think you know the difference between logical name and Physical description of a object. set_window is used by giving logical name and you can give physical description.
But _set_window needs only physical description.
_set_window does not change the active window in the gui map.
this will set window1 as the active "application window" and the active "gui window". When you _set_window on window2, the "application window" is shifted to the physical description of window2, but the gui map still "thinks" you are looking at window1.
This can be useful if you have a lot of windows with similar child objects (edit boxes, radio buttons, etc). This can allow you to make a single GUI map entry for multiple windows.
Likewise, you can shift the focus of the active GUI map window without shifting the currently active "application window" like this:
77. Is there any need for the GUI Map while working with Analog mode?
Ans. No. There is no need for the GUI Map file when we are working with analog mode
78.What is Silent Mode in WinRunner?
Ans. In silent mode, WinRunner suppresses messages during a test run so that a test can run unattended. When you run a test remotely from TestDirector, you must run it in silent mode, because no one is monitoring the computer where the test is running to view the messages.

79. What are the modes in which you can organize your GUI Map files?
Ans. We can organize the GUI Map files in any of the below two modes:

• In the GUI Map File per Test mode, WinRunner automatically creates a new GUI map file for every new test you create.

• In the Global GUI Map File mode, you can use a single GUI map for a group of tests.

80. What is treturn and texit.
Ans. Treturns, stops a called test and returns control to the calling test.
Texit, stops execution of the current test.

81. What is location and Index.How WR will identify the same gui objects in a window.
82. Can we change the phy desc of a gui object in GUI MAP EDITOR through script.
83. What is the WR testing process.
Ans.There are total 6 steps
1.Create Gui map
2.Create Test
3.Debug Test
4.Run Test
5.View Results
6.Report Defects

84. What is Runtime data base check point.
85. Ans.
86. What is Standard data base check point.
Ans. You can create the standard check points to compare the current values of the properties of the result set to the expected values captured during the record time or otherwise set before the test run.

In Standard database check points
1.Default checkpoint
2.Custom checkpoint (This checkpoints appears in your test script as a db_check statement)

87. What is Default data base checkpoint.
Ans.You this default checkpoint to check entire contents of a result set

88. What is Custom data base checkpoint.
Ans.Custom check points are used to check partial contents (i.e.) Number of rows, Number of columns of a result set.

The test script for the above to checkpoints appears as db_check("list1.cdl", "dbvf1");

where list1.cdl is the name of the checklist containing information about the database and the properties to check,

dbvf1 is the name of the expected results file.

How do you create a test plan/design?

Test scenarios and/or cases are prepared by reviewing functional requirements of the release and preparing logical groups of functions that can be further broken into test procedures. Test procedures define test conditions, data to be used for testing and expected results, including database updates, file outputs, report results. Generally speaking…
• Test cases and scenarios are designed to represent both typical and unusual situations that may occur in the application.
Test engineers define unit test requirements and unit test cases. Test engineers also execute unit test cases.
• It is the test team who, with assistance of developers and clients, develops test cases and scenarios for integration and system testing.
• Test scenarios are executed through the use of test procedures or scripts.
• Test procedures or scripts define a series of steps necessary to perform one or more test scenarios.
• Test procedures or scripts include the specific data that will be used for testing the process or transaction.
• Test procedures or scripts may cover multiple test scenarios.
• Test scripts are mapped back to the requirements and traceability matrices are used to ensure each test is within scope.
• Test data is captured and base lined, prior to testing. This data serves as the foundation for unit and system testing and used to exercise system functionality in a controlled environment.
• Some output data is also base-lined for future comparison. Base-lined data is used to support future application maintenance via regression testing.
• A pre-test meeting is held to assess the readiness of the application and the environment and data to be tested. A test readiness document is created to indicate the status of the entrance criteria of the release.
Inputs for this process:
• Approved Test Strategy Document.
• Test tools, or automated test tools, if applicable.
• Previously developed scripts, if applicable.
• Test documentation problems uncovered as a result of testing.
• A good understanding of software complexity and module path coverage, derived from general and detailed design documents, e.g. software design document, source code and software complexity data.
Outputs for this process:
• Approved documents of test scenarios, test cases, test conditions and test data.
• Reports of software design issues, given to software developers for correction.

What is the use of Test Director software?

TestDirector is Mercury Interactive software test management tool. It helps quality assurance personnel plan and organize the testing process. With TestDirector you can create a database of manual and automated tests, build test cycles, run tests, and report and track defects. You can also create reports and graphs to help review the progress of planning tests, running tests, and tracking defects before a software release.

Explain WinRunner testing process?

WinRunner testing process involves six main stages
1. Create GUI Map File so that WinRunner can recognize the GUI objects in the application being tested
2. 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.
3. Debug Test: run tests in Debug mode to make sure they run smoothly
4. Run Tests: run tests in Verify mode to test your application.
5. View Results: determines the success or failure of the tests.
6. 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 are the reasons that WinRunner fails to identify an object on the GUI?

WinRunner fails to identify an object in a GUI due to various reasons. The object is not a standard windows object. If the browser used is not compatible with the WinRunner version, GUI Map Editor will not be able to learn any of the objects displayed in the browser window.
What is the different between GUI map and GUI map files?

The GUI map is actually the sum of one or more GUI map files. There are two modes for organizing GUI map files. Global GUI Map file: a single GUI Map file for the entire application. GUI Map File per Test: WinRunner automatically creates a GUI Map file for each test created.
GUI Map file is a file which contains the windows and the objects learned by the WinRunner with its logical name and their physical description.

If the object does not have a name then what will be the logical name?

If the object does not have a name then the logical name could be the attached text.

How do you view the contents of the GUI map?

GUI Map editor displays the content of a GUI Map. We can invoke GUI Map Editor from the Tools Menu in WinRunner. The GUI Map Editor displays the various GUI Map files created and the windows and objects learned in to them with their logical name and physical description.

No comments: