![]() |
|
![]() |
| LinkBack | Thread Tools | Display Modes |
| | #76 (permalink) |
| Senior Member Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2 Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 | 114) What does auto, static, public and extern variables means?[/b] a. auto[/b]: An auto variable can be declared only within a function and is local to that function. It exists only for as long as the function is running. A new copy of the variable is created each time the function is called. b. static[/b]: A static variable is local to the function, test, or compiled module in which it is declared. The variable retains its value until the test is terminated by an Abort command. This variable is initialized each time the definition of the function is executed. c. public[/b]: A public variable can be declared only within a test or module, and is available for all functions, tests, and compiled modules. d. extern[/b]: An extern declaration indicates a reference to a public variable declared outside of the current test or module. |
| | |
| The Following User Says Thank You to Spoorthi For This Useful Post: | AjayKumar.Kataram (22-11-08)
|
| | #77 (permalink) |
| Senior Member Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2 Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 | 115) How do you declare constants?[/b] a. The const specifier indicates that the declared value cannot be modified. The class of a constant may be either public or static. If no class is explicitly declared, the constant is assigned the default class public. Once a constant is defined, it remains in existence until you exit WinRunner. b. The syntax of this declaration is: [class] const name [= expression];[/i] |
| | |
| The Following User Says Thank You to Spoorthi For This Useful Post: | AjayKumar.Kataram (22-11-08)
|
| | #78 (permalink) |
| Senior Member Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2 Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 | 116) How do you declare arrays?[/b] a. The following syntax is used to define the class and the initial expression of an array. Array size need not be defined in TSL. b. class array_name [ ] [=init_expression][/i] c. The array class may be any of the classes used for variable declarations (auto, static, public, extern). |
| | |
| The Following User Says Thank You to Spoorthi For This Useful Post: | AjayKumar.Kataram (22-11-08)
|
| | #79 (permalink) |
| Senior Member Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2 Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 | 117) How do you load and unload a compile module?[/b] a. In order to access the functions in a compiled module you need to load the module. You can load it from within any test script using the load command; all tests will then be able to access the function until you quit WinRunner or unload the compiled module. b. You can load a module either as a system module or as a user module. A system module is generally a closed module that is “invisible” to the tester. It is not displayed when it is loaded, cannot be stepped into, and is not stopped by a pause command. A system module is not unloaded when you execute an unload statement with no parameters (global unload). load (module_name [,1|0] [,1|0] );[/i] The module_name[/i] is the name of an existing compiled module. Two additional, optional parameters indicate the type of module. The first parameter indicates whether the function module is a system module or a user module: 1 indicates a system module; 0 indicates a user module. (Default = 0) The second optional parameter indicates whether a user module will remain open in the WinRunner window or will close automatically after it is loaded: 1 indicates that the module will close automatically; 0 indicates that the module will remain open. (Default = 0) c. The unload function removes a loaded module or selected functions from memory. d. It has the following syntax: unload ( [ module_name | test_name [ , "function_name" ] ] );[/i] |
| | |
| The Following User Says Thank You to Spoorthi For This Useful Post: | AjayKumar.Kataram (22-11-08)
|
| | #80 (permalink) |
| Senior Member Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2 Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 | 118) Why you use reload function?[/b] a. If you make changes in a module, you should reload it. The reload function removes a loaded module from memory and reloads it (combining the functions of unload and load). The syntax of the reload function is: reload ( module_name [ ,1|0 ] [ ,1|0 ] );[/i] The module_name is the name of an existing compiled module. Two additional optional parameters indicate the type of module. The first parameter indicates whether the module is a system module or a user module: 1 indicates a system module; 0 indicates a user module. (Default = 0) The second optional parameter indicates whether a user module will remain open in the WinRunner window or will close automatically after it is loaded. 1 indicates that the module will close automatically. 0 indicates that the module will remain open. (Default = 0) COMPLETED |
| | |
| The Following User Says Thank You to Spoorthi For This Useful Post: | AjayKumar.Kataram (22-11-08)
|
![]() |
| Tags |
| asked , interview , qanda , winrunner |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| More Interview Questions Here... |