Saturday, December 28, 2013

QTP

What is QTP? 
It is a functional and regression testing software that tests both web-based and windows applications. 
Detail answer: What is QTP? - Quick Test is a graphical interface record-playback automation tool. It is able to work with any web, java or windows client application. Quick Test enables you to test standard web objects and ActiveX controls. In addition to these environments, Quick Test Professional also enables you to test Java applets and applications and multimedia objects on Applications as well as standard Windows applications, Visual Basic 6 applications and.NET framework applications .

Explain QTP Testing process? - Quick Test testing process consists of 6 main phases: 
Create your test plan - Prior to automating there should be a detailed description of the test including the exact steps to follow, data to be input, and all items to be verified by the test. The verification information should include both data validations and existence or state verifications of objects in the application. 
Recording a session on your application - As you navigate through your application, Quick Test graphically displays each step you perform in the form of a collapsible icon-based test tree. A step is any user action that causes or makes a change in your site, such as clicking a link or image, or entering data in a form. 
Enhancing your test - Inserting checkpoints into your test lets you search for a specific value of a page, object or text string, which helps you identify whether or not your application is functioning correctly. NOTE: Checkpoints can be added to a test as you record it or after the fact via the Active Screen. It is much easier and faster to add the checkpoints during the recording process. Broadening the scope of your test by replacing fixed values with parameters lets you check how your application performs the same operations with multiple sets of data. Adding logic and conditional statements to your test enables you to add sophisticated checks to your test. 
Debugging your test - If changes were made to the script, you need to debug it to check that it operates smoothly and without interruption. 
Running your test on a new version of your application - You run a test to check the behavior of your application. While running, Quick Test connects to your application and performs each step in your test. 
Analyzing the test results - You examine the test results to pinpoint defects in your application. 
Reporting defects - As you encounter failures in the application when analyzing test results, you will create defect reports in Defect Reporting Tool. 

Describe all recording modes? 
There are 3 Recording modes. They are Normal Mode, Low Level Mode, and Analog Mode. QTP uses Normal Mode by default, which records almost anything. Low Level recording is used when there is any recognition problem using the other methods, which forces recognition. Analog Mode is the recognition of keyboard inputs, mouse clicks, and signatures. 
What is the difference between Manual and Automated test? 
Manual testing is time consuming, not robust, uses human resources, inconsistent, harder to repeat a test and costly. 
Automated testing is faster, robust, easily repeatable, reusable and cost efficient. 
What is an Object Repository? 
It’s a data storage that keeps a back up of all the objects used in an application. It’s a translator between the Script and Application Under Test (AUT) because it knows both the logical name and the properties of an object. 
What are the types of Object Repositories in QTP? - Quick Test has two types of object repositories for storing object information: shared object repositories and action object repositories. You can choose which type of object repository you want to use as the default type for new tests, and you can change the default as necessary for each new test. The object repository per-action mode is the default setting. In this mode, Quick Test automatically creates an object repository file for each action in your test so that you can create and run tests without creating, choosing, or modifying object repository files. However, if you do modify values in an action object repository, your changes do not have any effect on other actions. Therefore, if the same test object exists in more than one action and you modify an object’s property values in one action, you may need to make the same change in every action (and any test) containing the object. 

Explain the concept of object repository & how QTP recognizes objects? - Object Repository: displays a tree of all objects in the current component or in the current action or entire test (depending on the object repository mode you selected). We can view or modify the test object description of any test object in the repository or to add new objects to the repository. Quicktest learns the default property values and determines in which test object class it fits. If it is not enough it adds assistive properties, one by one to the description until it has compiled the unique description. If no assistive properties are available, then it adds a special Ordinal identifier such as objects location on the page or in the source code. 

Explain in brief about the QTP Automation Object Model. - Essentially all configuration and run functionality provided via the Quick Test interface is in some way represented in the Quick Test automation object model via objects, methods, and properties. Although a one-on-one comparison cannot always be made, most dialog boxes in Quick Test have a corresponding automation object, most options in dialog boxes can be set and/or retrieved using the corresponding object property, and most menu commands and other operations have corresponding automation methods. You can use the objects, methods, and properties exposed by the Quick Test automation object model, along with standard programming elements such as loops and conditional statements to design your program. 

In how many ways we can add check points to an application using QTP? - We can add checkpoints while recording the application or we can add after recording is completed using Active screen (Note : To perform the second one The Active screen must be enabled while recording). 

How does QTP identify objects in the application? - QTP identifies the object in the application by Logical Name and Class. 

What is Parameterizing Tests? - When you test your application, you may want to check how it performs the same operations with multiple sets of data. For example, suppose you want to check how your application responds to ten separate sets of data. You could record ten separate tests, each with its own set of data. Alternatively, you can create a parameterized test that runs ten times: each time the test runs, it uses a different set of data.
What is add-in? Which add-in did you work with? 
Add-in helps an application to recognize unique objects, object properties, programming languages. It’s also known as plug-ins. I’ve worked with Web, ActiveX, Java Plug-in, Multimedia and Visual Basic add-in. 
Write the syntax when you record in Analog recording mode? 
Desktop.RunAnalog “Track1” or 
Window(“Microsoft Internet”).RunAnalog “Track2” 
Write the syntax when you record in Low Level recording mode? 
Windows(“Microsoft Internet Explorer”).WinObject(“Internet Explorer_Server”).Type “jojo” 
Write the syntax when you record in Normal recording mode? 
Browser(“Welcome: Mercury”).Page(“Find a Flight:”).WebList(“fromPort”).select “New York” 
What is a Checkpoint? Define all the Checkpoints in QTP? 
Checkpoints are used to verify that the expected value/result matches the exact value/result. Following are some examples: 
Standard: Checks values of an object’s properties; it checks that a radio button is selected. 
Image: Checks the property values of an image; it checks that the image source file is correct. 
Table: Checks information in a table; it checks that the value in a table cell is correct. 
Page: Checks the characteristics of a Web page; it checks how long a Web page takes to load or if a Web page contains broken links. 
Text / Text Area: It checks whether the expected text string is displayed in the expected location on a Web page or dialog box. 
Bitmap: It checks that a Web page (or any portion of it) is displayed as expected. 
Database: Checks the contents of databases accessed by an application or Web site; it checks that the value in a database query is correct. 
Accessibility: Identifies areas of a Web site to check if the images on a Web page include ALT properties, required by the W3C Web Content Accessibility Guidelines. 
XML: Checks the data content of XML documents. 
What is the syntax of a Checkpoint? 
Browser(“Welcome: Mercury”).Page(“Book a Flight:”).Checkpoint(“Book a Flight”) 
What is test object model in QTP? - The test object model is a large set of object types or classes that Quick Test uses to represent the objects in your application. Each test object class has a list of properties that can uniquely identify objects of that class and a set of relevant methods that Quick Test can record for it. A test object is an object that Quick Test creates in the test or component to represent the actual object in your application. Quick Test stores information about the object that will help it identify and check the object during the run session. 

What is Object Spy in QTP? - Using the Object Spy, you can view the properties of any object in an open application. You use the Object Spy pointer to point to an object. The Object Spy displays the selected object’s hierarchy tree and its properties and values in the Properties tab of the Object Spy dialog box. 

What is Parameterization? 
It is the reusability of the same code for different sets of data. 
How many types of parameters are there? Define Input Value or Output Value? 
There is Input Parameterization, which is data that is entered manually before executing tests. There is Output Parameterization, which is data that is retrieved from a dynamic database during or after the execution of test. 
Define Regular Expression? Give some example? 
Regular Expression is a string that specifies a complex search phrase. For example, (.), (*), (^), ([]), and (+). 
What is a Modular test? Why do you need Modular testing? 
Modular test is dividing a test into several actions that can be re-used or edited or called by several other tests, which is also known as code re-usability. 
What is the difference between Call to Action and Copy to Action? 
A call to action cannot be modified at the called test, but only in its original test; whereas copy to action can, which creates a duplicate of an action. 
What is Synchronization? Write the statement/syntax for Synchronization? 
Synchronization is waiting for one object to finish its action to go to the next object. 
Syntax: Window(“Flight Reservation”).WinButton(“Update Order”). WaitProperty ”enabled”, 1, 3000 
SMART Identification

Smart Identification is nothing but an algorithm used by QTP when it is not able to recognize one of the object. A very generic example as per the QTP manual would be, A photograph of a 8 year old girl and boy and QTP records identification properties of that girl when she was 8, now when both are 10 years old then QTP would not be able to recognize the girl. But there is something that is still the same, that is there is only one girl in the photograph. So it kind of PI (Programmed intelligence) not AI.

When should i use SMART Identification?

Something that people don't think about too much. But the thing is that you should disable SI while creating your test cases. So that you are able to recognize the objects that are dynamic or inconsistent in their properties. When the script has been created, the SI should be enabled, so that the script does not fail in case of small changes. But the developer of the script should always check for the test results to verify if the SI feature was used to identify a object or not. Sometimes SI needs to be disabled for particular objects in the OR, this is advisable when you use SetTOProperty to change any of the TO properties of an object and especially ordinal identifiers like index, location and creationtime.

Descriptive Programming

Descriptive programming is nothing but a technique using which operations can be performed on the AUT object which are not present in the OR. For more details refer to http://bondofus.tripod.com/QTP/DP_in_QTP.doc (right click and use save as...)

Recovery Scenarios

What is a Recovery Scenario?

Recovery scenario gives you an option to take some action for recovering from a fatal error in the test. The error could range in from occasional to typical errors. Occasional error would be like "Out of paper" popup error while printing something and typical errors would be like "object is disabled" or "object not found". A test case have more then one scenario associated with it and also have the priority or order in which it should be checked.

What does a Recovery Scenario consists of?

Trigger: Trigger is nothing but the cause for initiating the recovery scenario. It could be any popup window, any test error, particular state of an object or any application error.
Action: Action defines what needs to be done if scenario has been triggered. It can consist of a mouse/keyboard event, close application, call a recovery function defined in library file or restart windows. You can have a series of all the specified actions.
Post-recovery operation: Basically defined what need to be done after the recovery action has been taken. It could be to repeat the step, move to next step etc....

What is the purpose of Recovery Scenarios? 
Sometimes there are errors during a recording session that can QTP can recover using Recovery Scenarios and continue running the test. It works as an Object Repository that backup objects and its properties for such events. 
What is an Optional Step? 
This is used to block unnecessary pop up box, warnings, and messages that can interfere with running any tests for error. 
Define Virtual Objects? 
Virtual Object allows us to record and run tests on objects that are not normally recognized by QTP. 
Why do you need to enable Object Smart Identification? 
QTP by default records any objects’ distinct properties but even after distinct properties, an object may have duplication or be repeated; therefore by enabling the Smart Identification it uses auxilliary/subsidiary properties to identify other distinct features. Otherwise, Ordinal position is use to make the distinction by the distance of two objects. 
What is the purpose of doing Descriptive programming? 
Descriptive programming is used to bypass the use of Object repository, which knows the logical name and the properties of an object. In this case Object spy is used to gather the properties of an object and then hand code the properties in the script. 
What are windows API functions? 
Application Programming Interface (API) is a software interface used by other programs to read or write data from disk, gather file attributes, and change a color on dialog boxes. 
It is also a collection of code hidden inside dynamic link library files. 
What is User-Defined function? 
It is codes manually writing for different functions for reusability in one or multiple tests. 
For example, if you have a large segments of code that you need to use several times in one or different tests, you would create a user-defined function in order to make your tests easier to design and to read. 
What is the difference between Tree View/Expert View? 
In Expert View we see our recorded steps in Visual Basic code language; whereas, in Tree View, we see the same recorded steps in a normal English language view. 
What is the difference between Design Time/Runtime data table? 
The Design-Time data table reflects data prior to the execution of the script. 
The Runtime data table represents the table as it looks at the completion of script execution.
What is a data driven test? 
Data driven test uses input parameters to play back the test using different values of input data. 

Load Runner
1. What is load, stress, volume testing? 
Ans: Load Testing is performed to find out if the system can handle the expected load upon deployment under real-world conditions. 
Stress testing is performed to find the application’s breaking point. 
Volume/Endurance testing is performed to find the stability of the system with respect to handling large amounts of data over extended time period. 
2. What is task distribution diagram? 
Ans: This diagram helps us to find the peak time. It gives us the information on number of users for a particular transaction and the time of the load. 
3. Which business process should you record? 
Ans: Mission-critical are the transactions that any business depends on the most. 
Heavy throughput is the transactions that are used most often. 
Dynamic Content is the transactions that require the database lookup, dynamic page or text generation during the process. 
4. What are the components of Load Runner? 
Ans: There is VuGen, Controller, Load Generator, and Analysis. 
5. What’s a Vuser? 
Ans: Vuser is Virtual user that is generated virtually to emulate the steps of real human users. 
6. What are the Vuser types? 
Ans: All Protocols: A list of all supported protocols in alphabetical order. 
Application Deployment Solution: For Citrix 
Client/Server: For DB2, SQL… 
Custom: For C, VB, Java Templates 
Distributed Components: For COM/DCOM, Cobra-Java 
E-business: Web (HTTP/HTML) 
Enterprise Java Beans: For EJB Testing 
Legacy: For Remote Terminal Emulation (RTE) 
Mailing Services: Internet Messaging (IMAP), MS Exchange (MAPI), POP3 and SMTP. 
Middleware: Jacada and Tuxedo 
Streaming: For Media Player 
Wireless: For I-Mode, VoiceXML and WAP 
7. What is the difference between script view and tree view? 
Ans: Tree view shows us our recording in icon-based format, whereas script view shows us coding like C, VB languages. 
8. Describe the sections in VuGen script? 
Ans: In VuGen script there are three Vuser script sections; they are 
Vuser_init: it’s the login procedures. 
Actions: it’s the client activities. 
Vuser_end: it’s the log off procedures. 
9. What is the LR transaction? 
Ans: A transaction represents an action or a set of actions that one would want to measure the performance of the server with. 
10. What is a checkpoint? 
Ans: It verifies whether a visual cue appeared as expected. 
11. How many checkpoints are there in LR? 
Ans: There are two checkpoints in LR, Text checkpoint and Visual Cue/Image Checkpoints. 
12. What is a rendezvous point? 
Ans: It’s a meeting point between a given numbers of Vuser to measure the performance of the server when those Vusers are allowed to start one specific transaction at the same time. 
13. When does the controller release the rendezvous? 
Ans: The controller releases the Vusers from the rendezvous either when the required number of Vusers arrives, or when a specified amount of time has passed. 
14. Can you insert rendezvous point after recording? 
Ans: You can insert in your script after you complete a recording session. 
15. How do you insert rendezvous point? 
Ans: Click Insert>Rendezvous for the VuGen menu. 
16. Where do you insert rendezvous point? 
Ans: It is done in the script. 
17. How do you set the rendezvous attributes? 
Ans: We can set the following rendezvous attributes from the Rendezvous information dialog box (Scenario>Rendezvous). 
18. What is a parameter and parameterization? 
Ans: Parameter is a placeholder that replaces a recorded value using an external data source. 
Parameterization replaces the recorded value with a placeholder to allow us to use the same script with multiple sets of data. 
19. Why do you parameterize the Vuser script? 
Ans: Unique Constraint: To accommodate any field that requires a unique value for each user. 
Date Constraint: It helps in the case when a script is recorded yesterday and run or execute today will give us an error. 
Data Dependency: When one data value of an object determines what the acceptable value can be for another object. 
Data Caching: It eliminates the effects of data caching which creates misleading results. 
20. What are the parameter types? 
Ans: Internal Data, Data Files, and User-defined Functions. 
21. What is the data access method? 
Ans: It tells the LR in what order to use data from the file (data source): Sequential, Random, Unique, Same line as .
22. What changes do you need to make to view the parameter data in execution log?
Ans: To see parameter data in the execution log, select Extended log and Parameter substitution in the Run-time settings.
23. After parameterizing the script, what are the most important run time settings do you need to change?
Ans: The number of iterations should equal the number of rows in the data file in run logic section of Run-time settings.
24. Explain the difference between the script run time setting and controller runtime settings?
Ans: The difference is that the VuGen script run time setting only works with itself, but when it is sent to the controller, it can override the settings.
25. What are the general runtime settings?
Ans: Run Logic, Pacing, Log, Think Time, Miscellaneous.
26. What’s run Logic?
Ans: the number of iteration.
27. What’s pacing?
Ans: The time between each iterations
28. What is log?
Ans: Notes and comments acquired by the LR by default of any error or ever the entire process.
29. How do you configure log?
Ans: You can select either Standard or Extended Log; also you can manually program a vuser script to send the information by using the Lr_error_message and Lr_output_message functions.
30. What is think time?
Ans: The time a real user takes between steps.
31. How do you do error handling?
Ans: By default, when Vuser detects error, it stops executing; however, using runtime settings one can enable the “Continue on error” so that execution does not stop on error.
32. How do you change the threshold?
Ans: Threshold level is the level below which the recorded think time that will be ignored. We can change it in the Recording options of the VuGen.
33. Difference between run Vuser as process and thread?
Ans: Running Vuser as a process (parent) requires more memory space because it uses one driver for each Vusers whereas thread (child) uses only one driver for all Vusers.
34. Why would you want to check the run Vuser as a thread option?
Ans: This will save more memory space.
35. What is correlation?
Ans: It is the parameterization of a value that is created dynamically every time a script is run so that the first recorded value is used for all the next script runs.
36. How do you encrypt text in LR?
Ans: In the script view we first select the text to encrypt and right click on it to select the Encrypt String from the menu
37. What is a scenario?
Ans: A scenario is a file that defines which Vusers to execute, the number of Vusers to run, the goals of the test, which computer hosts the Vusers and the conditions under which to run the load test.
38. What is controller?
Ans: A controller is like an administrator who creates, maintains, and executes designed Scenarios; also run and stop the load test.
39. What’s load generator?
Ans: Load generator is computers that run the Vusers.
40. What’s analysis?
Ans: Analysis processes the gathered scenario results and generates graphs and reports.
41. How many controllers must be installed in order to conduct a load test?
Ans: Only one controller is needed.
42. What factors determines the location of load generators?
Ans: Your customer locations determine where to install your load generators.
43. What’s the difference between manual and goal oriented scenarios?
Ans: In Manual you create the scenarios yourself by defining the number of Vuser groups building a schedule, the total number of Vusers to be used and assigning a percentage of the total number of Vusers to each script.
In Goal oriented LR manages Vusers automatically.
44. How many goal types are there in goal-oriented scenarios?
Ans: There are five types: The number of Vusers, the number of hits per second, the number of transactions per second, the number of pages per minute, and the transaction response time you want your scenario to reach.
45. What’s ramp up and ramp down?
Ans: Ramp up is the incremental points and Ramp down is the detrimental points from the Ramp up point.
46. What’s the difference between using schedule by scenarios and schedule by group?
Ans: Schedule by Scenario allows us to see how the application is performing under typical and peak hours. And Schedule by Group allows us to see how the application is performing when certain business process is being used.
47. Why is initialization important?
Ans: It helps in reducing the CPU consumption and getting realistic results.
48. Where will you set Vuser quotas?
Ans: In the runtime settings from the Tools>Options.
49. What happens when running scenarios?
Ans: During runtime results are stored locally on each load generator. After execution, results from all load generators are transferred to the controller’s results directory for analysis.
50. What are the Vusers statuses?
Ans: DOWN The Vuser is down.
PENDING The Vuser is ready to be initialized and is waiting for an available load generator, or is transferring files to the load generator. The Vuser will run when the conditions set in its scheduling attributes are met.
INITIALIZING The Vuser is being initialized on the remote machine.
READY The Vuser already performed the init section of the script and is ready to run.
RUNNING The Vuser is running. The Vuser script is being executed on a load generator.
RENDEZVOUS The Vuser has arrived at the rendezvous and is waiting to be released by LoadRunner.
DONE.PASSED The Vuser has finished running. The script passed.
DONE.FAILED The Vuser has finished running. The script failed.
ERROR A problem occurred with the Vuser. Check the Status field on the Vuser dialog box or the output window for a complete explanation of the error.
EXITING The Vuser has finished running or has been stopped, and is now exiting.
STOPPED The Vuser stopped when the Stop command was invoked.
51. What’s time out?
Ans: It indicates that the Web server is not responding or that connectivity has slowed between the load generators and the Web servers.
52. What’s HTTP 500?
Ans: It indicates either that individual business processes are failing under load, or that the Web application itself has crashed.
53. What’s load balancing?
Ans: Load balancing evenly distributes the load generated by Vuser among the requested load generator machines, ensuring an accurate load test.
54. Write some monitor types?
Ans: Runtime Monitors, transaction monitors, web resource monitors, system resource monitors, network delay monitor, firewall monitor, web server resource monitors…
55. Write the default graphs?
Ans: Running Vusers, Hits per Second, Transaction Response time, and Windows resource.
56. What’s the benefit of windows resource monitors?
Ans: It shows the windows resources usage in real time and locates any bottleneck on a particular load generator machine.
57. What is relation between response time and throughput?
Ans: The throughput graph shows the amount of data in bytes 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.
58. How do you identify the performance bottleneck?
Ans: Performance bottleneck can be identified using monitors.
59. How did you find web server related issues?
Ans: We can use the Web resource monitors.
60. How did you find database related issues?
Ans: By running the Database monitor and help of Data Resource Graph.
61. What is the difference between overlay and correlate graph?
Ans: Overlay: it overlay the content of two graphs that shares a common x-axis.
Correlate: Plots the Y-axis of two graphs against each other.
62. What are the layers of OSI models?
Ans: Application, presentation, session, transport, network, data link, and physical.
63. What’s firewall?
Ans: It is used to block outside communication with some exceptions.
64. What’s IP spoofing?
Ans: It emulates real-world network traffic and associates each Vuser with a different IP address.
65. What’s proxy?
Ans: A proxy server acts as an intermediary between a workstation and the Internet so that the enterprise can ensure security, administrative control and caching service

No comments:

Post a Comment