Load Runner Interview Questions Part2

November 2nd, 2007 Rama Posted in Load Runner Interview Questions Part2 | 1 Comment »

1.How do you perform functional testing under load?
Functionality under load can be tested by running several Vusers concurrently. By increasing the amount of Vusers, we can determine how much load the server can sustain.

2. What is Ramp-up? How do you set this?
This option is used to gradually increase the amount of Vusers/load on the server. An initial value is set and a vlaue to wait between intervals can be specified. To set Ramp-up, go to “Scenario Scheduling Options”.

3. What is the advantage of running the Vuser as thread?
VuGen provides the facility to use multithreading this enables more Vusers to be run per generator. If the Vuser is run as a process, The same driver program is loaded into memory for each Vuser, Thus taking up a large amount of memory. This limits the number of Vusers that can be run on a single generator. If the Vuser is run as a thread, the only one instance of driver program is loaded into memory for the given number of Vusers (Say 100). each thread shares the memory of the parent driver program thus enabling more Vusers to be run per generator.

4. If you want to stop the execution of your script on error? How do you do that?
The lr_abort function aborts the execution of a Vuser script. It instructs the Vuser to stop executing the actions sections, execute the Vuser_end section and end the execution. This function is useful when you need to manually abort a script execution as a result of a specific error condition. When you end a script using this function, the Vuser is assigned a status “stopped”. For this to take effect we have to first uncheck the “continue on error” option in runtime setting.

5. What is the relation between response time and throughput?
The throughput graph shows the amount of data in bites that the Vusers received from the server in a second. When we compare this with the transaction response time we will notice that as throughput decreased, the response time also decreased. Similarly the peak throughput and highest response time would occur approximately at the same time.

6. Explain the configuration of your system?
The configuration of your system refers to that of the client machines on which we run the Vusers. The configuration of any client machine includes its hardware settings, memory, operating system, software applications, development tools. this system component configuration should match with the overall system configuration that would include the network infrastructure, the web server, the database server, and any other components that go with this larger system so as to achieve the low testing objectives.

7. How do you identify the performance bottlenecks?
Performance bottleneck can be detected by using monitors. these monitors might me application server monitors, web server monitors, database server monitors and network monitor . They help in finding out the troubled area in our scenario, which causes increased response time. The measurements made are usually performance response time, throughput, hits /second, network delay graphs etc..

8. If web server, database and network are all fine where could be the problem?
The problem could be in the system itself or in the application server or in the code written for the application.

9. how do you find web server related issues?
Using web resource monitors we can find the performance of web servers. Using these monitors we can analyze throughput on the web server, number of hits /second that occurred during scenario, the number of hit responses per second the number of download pages per sec.

10. how did you find the database related issues?
By running database monitor and help of data resource graph we can find database related issues. Example, you can specify the resource you want to measure on before running the controller and then you can see database related issues.

AddThis Social Bookmark Button

Load Runner Interview Questions Part1

November 2nd, 2007 Rama Posted in Load Runner Interview Questions Part1 | No Comments »

1. Why do you create parameters?
Parameters are like script variables. they are used to vary input to the server and to emulate real users. Different sets of data are sent to the server each time the script is run. Better simulate the usage model for more accurate testing from the controller; one script can emulate many different users on the system.

2. what is co-relation? Explain the different between automatic Co-relation and Manual co-relation?
Co-relation is used to obtained data which are unique for each run of the script and which are generated by nested queries. Co-relation provides the value to avoid errors arising out of duplicate values and also optimizing the code (to avoid nested queries). Automated Co-relation is where we set some rules for co-relation. It can be application server specific. Here values are replaced by data, which are created by these rules. In manual co-relation the value we want to correlate is scanned and create co-relation is used to co-relate

3. How do you find out where co-relation is required? Give few example from your projects?
Two ways: First we can scan for correlations, and see the list of values which can be correlated. from this we can pick a value to be correlated.
Secondly, we can record two scripts and compare them. We can look up the difference file to see for the values, which needed to be correlate.
In my project there was a unique ID developed for each customer it was nothing but insurance number, it was generated automatically and it was sequential and this value was unique. I had to correlate this value, in order to avoid errors while running my script. I did using scan for correlation.

4. Where do you set automatic correlation options?
Automatic Correlation from web point of view can be set in recording options and correlation tab. Here, we can enable correlation for the entire script and choose either issue online messages or offline actions, where we can define rules for the correlation. Automatic Correlation for database can be done using show output window and scan for correlation and picking the correlate query tab and choose which query value we want to correlate. If we know the specific value to be correlate, we just do create correlation for values and specify how the value to be created.

5. What is the function to capture dynamic value in the web Vuser script?
Web_reg_save_param function saves dynamic data information to a parameter.

6. When do you disable login Virtual User Generator, when do you choose standard and extended logs?
Once we debug script and verify that it is functional, we can enable login for errors only. When we add a script to a scenario, logging is automatically disabled
Standard log option: When you select standard log it creates a standard log off functions and messages sent during script execution to use for debugging. Disable this option for large Load test scenarios when you copy a script to a scenario logging is automatically disabled.
Extended log option: Select extended log to create and extended log, including warning and other messages. Disable this option for large load testing scenarios. When you copy a script to a scenario logging is automatically disabled. We can specify which additional information should be added to the extended log using the extended log options.

7. How do you debug a load runner script?
VuGen contains two options to help debug Vuser scripts-the run step by step command and break points.The debug settings in the options dialog box allow us to determine the extend of the trace to be performed during the scenario execution. The debug information is written to the output window we can manually set the message class within your script using the LR_set_debug_message function. This is useful if we want to receive debug information about a small section of the script only.

8. How do you write user defined fuctions in Load runner? Give me few functions you wrote in your previous project?
Before we create the user defined function we need to create the external library (DLL) with the function. We add this library to VuGen Bin directory. Once the library is added then we assign user defined function as parameter. The function should have the following format: _declspec(dllexport) char * < function name > (char*, char*) Examples of the user defined functions are as follows: Get Version Get Current Time, Getpltform are some of the user defined functions used in my earlier project.

9. What are the changes you can make in runtime settings?
The runtime settings that we make are
1)Pacing: It has iteration count.
2)Log: Under this we have disabled logging standard log
3)Extended think time: In think time we have two options like ignore think time and replay think time.
4)General: under general tab we can set the Vusers as process or as multi threading and whether each step as transaction.

10. Where do you set iteration for Vuser testing?
We set iteration in the run time settings of the VuGen. The navigation for this is runtime setting, phasing tab, set number of iterations.

Tags: , ,

AddThis Social Bookmark Button

Load Runner Interview Questions

November 2nd, 2007 Rama Posted in Load Runner Interview Questions | No Comments »

1. What is load testing?
Load testing is to test that the application works with the loads that results from large number of simultaneous users , transactions and to determine whether it can handle peak usage periods.

2. What is performance testing?
Timing for both read and update transaction should be gathered to determine whether system functions or being performed in an acceptable time frame. This should be done standalone and then in a multi user environment to determine the effect of multiple transactions on the timing of a single transaction.

3. Explain the load testing process?
Step1: Planning the test: Here, we develop a clearly defined test plan to ensure the test scenarios we develop will accomplish load testing objectives.
Step2: Creating Vusers: Here, we create Vuser scripts that contain tasks performed by each Vusers, tasks performed by Vusers as whole, and tasks measured as transactions.
step3: Creating the scenario: A scenario describes the events that occurred during the testing session.It includes a list of machines scripts and Vusers that run during the scenario. We create scenarios using load runner controller. We can create manual scenarios as well as goal oriented scenarios. In manual scenarios, we defined the number of Vusers, the load generated machines, and percentage of Vusers to be assigned to each script. For web tests we may create a goal oriented scenario where we define the goal that our test has to achieve. Load runner automatically builds a scenarios for us.
step4: Running the Scenario: We emulate load on the server by instructing multiple Vusers to perform tasks simultaneously. Before the testing, we set the scenario configuration and scheduling. We can run the entire scenario, Vuser groups, or individual Vusers.
Step5: Monitoring the scenario: We monitor scenario execution using the load runner online run time transaction system resource, web resource, web server resource, web application server resource, database server resource, network delay, streaming media resource, firewall server resource, ERP server resource and Java performance monitors
Step6: Analyzing the Test results: During the scenario execution LR records the performance of the application under different loads. We use load runner’s graphs and reports to analyze the application performance.

4. When do you do load and performance testing?
We perform load testing once we are done with interface (GUI) testing. Modern system architectures are large and complex. Where as single user testing primarily on functionality and user interface of a system component, application testing focuses on performance and reliability of an entire system. For Ex: A typical application testing scenario might depict 1000 users login in simultaneously to a system. This gives rise to issues such as what is the response time of the system, does it crash, will it go with different software application and platform, can it hold so many 100’s and 1000’s of users etc.. This is when we set to do load and performance testing.

5. What are the components of load runner?
The components of load runner are the virtual user generator, controller, the agent process, load runner analysis and monitoring, load runner books online.

6. What component of load runner would you use to record a script?
The Virtual user generator (VuGen) component is used to record a script. It enable you to develop Vuser scripts for a variety of application types and communication protocols.

7. What component of Load runner would you use to playback the script in multi user mode?
The controller component is used to playback the script in multiuser mode. This is done during the scenario run where a Vuser script is executed by number of Vusers in a group.

8. What is a rendezvous point?
You insert rendezvous point into Vuser scripts to emulate heavy user load on the server. Rendezvous point instructs Vusers to wait during the test execution for multiple Vusers to arrive at certain point, in order that they may simultaneously perform a task. for Ex. To emulate peak load on the bank server, you can insert a rendezvous point instructing 100 Vusers to deposit cash into their accounts at the same time.

9. What is a Scenario?
A Scenario defines the events that occur during each testing sessions. For example a scenario defines and controls the number of user to emulate, the actions to be performed, and the machines on which the virtual users run their emulations.

10. Explain the recording mode for Web Vuser Script?
We use VuGen to develop a Vuser script by recording a user performing typical business process on a client application. VuGen creates a script by recording the activity between the client and server. For example, in web based application, VuGen monitors the client end of database and traces all the request sent to, and receive the database server. We use VuGen to monitor the communication between the application and server, Generates the required function calls and insert the generated function calls into a Vuser script.

AddThis Social Bookmark Button

QTP Interview Questions Part 6

November 1st, 2007 Rama Posted in QTP Interview Questions Part 6 | 1 Comment »

1.Object Repository types, which and when to use?
Deciding which object repository mode to choose the default object repository mode and appropriate object repository mode for each test, you need to understand the differences between the two modes.
In general; the object repository per action mode is easiest to use when you r creating simple recored and run tests, especially under the following conditions.
You have only one or very few, tests that correspond to a given application interface or set of objects.
You do not expert to frequently modify test object properties. You generally create single action tests conversely, the shared object repository mode is generally the preferred mode when you have several test that test elements of the same application, interface or set of objects.
you expert the object properties in your application to change from time to time and / or you regularly need to up date or modify test object properties.
You often work with multi action tests and regularly use insert copy of action and insert called to action options.

2. Can we script any test case with out having object repository ? or using object repository is a must?
No. You can script with out object repository by knowing the window handlers, spying and recognizing the objects logical names and properties available.

3. How to execute a WR script in QTP?
a)TSL tset.run test, test path, test set.[parameters]–>used in QTP 6.0 for backward compatibility.
Parameters:the test set with in quality center, in which test runs are stored. Note that this argument is relevant only when working with a test in a quality center project.When the test is not saved in a quality center, this parameter is ignored. Ex . TSL test.run test “D:\Tset1″
B) TSL test.runtestex testpsth,run minimize, close app [parameter] TSL test.runtestex “C:\Win Runner/Tests/Basic_Flight”,True,False,”My Value”.
Close App:indicates whether to close the WR application when the WR tset run ends.
Parameter: up to 15 WR function argument.

4.How to handle time errors?
On Error Resume next:causes execution to continue with the statement immediately following the statement that causes the run time error, or with the statement immediately following tie most recent call out of the procedure containing the on error resumes next statement.
This allows execution to continue despite a run time error. you can then build the error handling routine inline with in the procedure using “Err” object MSG box “error no:” “&Err.no&”.”&Err.description” “&Err.source&Err.help context”.

5.How to change the run time value of property for an object?
Set to property changes the property values used to identify an object during the test run. Only properties that are included in the test object description can be set.

6. How to retrieve the property of an object?
Using GETRO property.

7. How to open any application during scripting?
Systemutil, object used to open and close applications and processes during a run session. A systemutil.run statement is automatically added to your test when you run an application from the start menu or the run dialog box while recording a test. Ex. sytemutil.run “notepad.exe”
systemutil.close descendant processes (closes all the processes open by QTP ).

8.Types of properties that QTP learns while recording?
Mandatory and assistive. In addition to recording the mandatory and assistive properties specified in the object identification dialog box, QTP can also record a backup ordinal identifier for each test object. The ordinal identifier assigns the object in numerical value that indicates it’s order relative to other objects with an otherwise identical description (objects that have the same vales foe all properties specified in the mandatory and assistive property list). This ordered value enable QTP to create a unique description when the mandatory and assistive properties are not sufficient to do so.

9.What is the extension of script and object repository files?
Object repository: .TSR, script: .MTS, Excel: default.ELS

10. How to suppress warning from the test result page?
From the test result viewer “tools > filters > warnings ” must be unchecked.

11.When we try to use test run option run from step, the browser is not launching automatically? Why?
This is default behavior.

12. Does QTP is unicode compatible ?
QTP 6.5 is not but QTP 8.0 is expected to be Unicode compatible by end of Dec 2004.

13.How to turn off QTP results after running a script?
Go to tools > option > run tab and deselect view results when run session ends. But this suppresses only the result window, but a log will be created and can viewed manually which can not be restricted from getting created.

14.How to get font size of a web edit?

15. Is there any way to automatically update the data source name in data base checkpoints object when we migrate test to a new release?

16. How to verify the cursor focus of a certain field?
Use focus property of GETRO property method

17.Any limitation to XML check points ?
Mercury has determined that 1.4mb is the maximum size of XML file that QTP 6.5 can handle.

18. How to make arguments optional in a function?
This is not possible as default VBS does not support this. Instead you can pass a blank scoring and have a default value if arguments are not required.

19. How to convert a sting to an integer?
CInt ()—> a conversion function available.

20. Inserting a call to action is not importing all columns in data table of global sheet. Why?
Inserting a call to action will only import the columns of the action called.

AddThis Social Bookmark Button

QTP Interview Questions Part 5

November 1st, 2007 Rama Posted in QTP Interview Questions Part 5 | No Comments »

1. How to add a Run-time parameter data sheet?

Datatable.localsheet
The following example, uses the Local Sheet property to return the Local Sheet of the run time data table in order to add a parameter(column) to it.
My parameter = DataTable. LocalSheet.AddParameter(”Time”, “5.45″)

2. What scripting language is used in QTP?
VB scripting

3. Analyzing the Checkpoint results
Standard Checkpoint : By adding standard checkpoints to your checks or components, you can compare the expected values of objects properties to the object’s current values during the run session, if the results doesn’t match the check point fails.

4. How to create a Run-time property for an object?

5. Table and DataBase(DB) checkpoints
By adding Table checkpoints to your tests or components we can check that a specified value is displayed in a cell in a table on your application. By adding DB checkpoints to your tests or components you can check the contents of database accessed by your application. The Results displayed for table and database checkpoints are similar. When you run tests or components QTP compares the expected results of the checkpoints to the actual results of the run session, if the results do not match the checkpoint fails.
You can check that a specified value is displayed in a cell in a table by adding a table checkpoint to your test or component.
For ActiveX tables, you can also check the properties of the table objects. To add a table checkpoint you use the checkpoint properties of dialog box. Table checkpoints are supports for web and ActiveX applications as well as for variety of External Add-in environments.
You can use Database checkpoints in your tests or components to check databases accessed by your websites or application and to delete defects. You define a query on your database, and then you create a database checkpoint that checks the results of the query. Database checkpoints are supported for all environments supported by QTP by default as well as for variety of external Add-in environments.
There are two ways to define a database query.
a. Use Microsoft Query. you can Install Microsoft Query from the custom installation of Microsoft office.
b. Manually define an Sql statement.
The checkpoints time out option is available only when creating a table checkpoint.
That is not available when creating a database checkpoints.

6. Checking Bitmaps.
You can check an area of a web page or application as bitmap. While creating a test or a components you specify the area you want to check by selecting an object. You can check an entire object or any area with in an object. QTP captures the specified object as bit map and inserts a checkpoint in the test or component.
You can also choose to save only the selected area of the object with your test or component in order to save disk space.
When you run the test or component QTP compares the object or selected area of the object currently displayed of the web page or the application with the bitmap stored when the test or component was recorded. If there are any differences QTP captures bitmap of the actual object and displays it with the expected bitmap in the details portion of the test results window.
By comparing the two bitmaps(Expected and Actual) you can identify the nature of the discrepancy for more information on the test results of a checkpoint, see viewing checkpoint results.
For example, suppose you have a website that can display a map of a city the user specify that map has control keys for zooming.
You can record the new map i.e displayed after one check on the control key that zooms in the map. Using the bitmap checkpoint, you can check that the map zooms in correctly.
You can create bitmap checkpoint, all supported testing environments (as long as the appropriate add-ins are loaded)

Note: The result of bitmap check point may be effected by factors such as OS, Screen Resolutions and color settings.

7. Text/Text area checkpoint
In the Text/Text area checkpoint propertied dialog box, you can specify the text to be checked as well as which text is displayed before and after the checked text. These configuration options are particularly helpful when the text string you want to check appears several times or when it could change in a predictable way during the run session
Note: In windows based environment. If there is more than one line of text selected, the checkpoint summary pane display (complex value ) instead of the selected text for the checkpoint.
QTP automatically displays the checked text in red and the text before and after the checked text in blue.
For text area checkpoints only the text string captured from the defined area is displayed(Text before and text after are not displayed)
To designate the parts of the captured string as checked text and other parts as text before and text after, click configure button.
The configure text selection dialog box opens.
Checking XML : XML (Extensible Markup language)is a Meta-Markup language for test documents i.e endorsed as a standard by the WC3.XML makes the complex data structure portable between different computer environments or operating systems and programming languages, facilitating the sharing of data.
XML files contain text with simple tags that describe the data within an XML documents these describe the data content, but not the presentation of the data.
Application that display and XML documents or file use either cascading style sheets of the XSL formatting objects(XSL-FO) to present the data.
You can verify the data content of XML files by inserting XML checkpoints. A few common uses of XML checkpoints are described below
An XML file can be a static data file i.e accessed in order to retrieve commonly used data for which a quick response time is needed. For example, country names, zip codes or area codes although this data can be changes over time it is normally quite static.
You can use an XML checkpoint to validate that the data has not changed from one application released to another.
An XML file can consists of elements with attributes and values(character data).
There is parent and child relationship between the elements, and elements can have attributes associated with them. If any part of the structure(including data) changes the applications ability to process the XML file may be effected. Using an XML checkpoint you can check the content of an element to make sure that its, attributes, and values have not changed.
XML files are often an intermediary that retrieves dynamically changing data from 1 system.
The data is then accessed by another system using document type definitions(DTD) enabling the accessing system to read and display the information in the file. You can use an xml checkpoint and parameterize the captured data values in order to check an xml document or file whose data changes in a predictable way.
XML documents and files often needed a well defined structure in order to be portable across platforms and development systems. One way to accomplish elements this is by developing and XML scheme which describes the structure of XML elements and data types. You can use scheme validation to check that each item of content in an xml file adheres to the scheme description of the elements in which the content is to be placed.

AddThis Social Bookmark Button