A U T O M AT I O N T E S T I N G There are two ways of Testing. 1. MANUAL TESTING. 2. AUTOMATION TESTING. 1). MANUAL TESTING It is a process in which all the phases of Software Testing Life Cycle like Test Planning, Test Development, Test Execution, Result Analysis, Bug Tracking and Reporting are accomplished successfully manually with human efforts. Drawbacks of Manual Testing 1. 2. 3. 4. 5. 6.
More number of people is required. Time consuming. No accuracy. Tiredness. Simultaneous actions are almost impossible. Repeating the task in a same manner is not so easy manually.
2). AUTOMATION TESTING It is a process in which all the drawbacks of manual testing are addressed (over come) properly and provides speed and accuracy to the existing testing phase. Note: Automation Testing is not a replacement for manual testing it is just a continuation for a manual testing in order to provide speed and accuracy. Drawbacks of Automation Testing 1. Too cost. 2. Cannot automat all the areas. 3. Lake of expatriation. AUTOMATION TOOL Automated Tool is an Assistance of test engineers, which works based on the instructions and information. General foam work to learn any automated tool. A test engineer should learn the following to work with any automated tool. 1. 2. 3. 4. 5.
How to give the instruction. How to give the information. How to use its recording facility. How to use its play back facility. How to analysis the Result.
Types of Automated Tools Automated tools are broadly divided into 3 Types 1. Functional Tools (Q.T.P, Win Runner) 2. Management Tools (Test Directory / Quality Center) 3. Performance Tools (Load Runner) Functional Tools (Q.T.P, Win Runner) Q.T.P (Quick Test Professional) Introduction Type of the Tool Company Scripting Language Version
: : : :
Functional Tool Mercury Interactive Incorporation. VB Script #5.5, 6.5, 7.0, 7.2, 8.0, 8.2, 9.0, 9.1, 9.2.
Anatomy of Q.T.P Vbwindow (“Emp”). VbEdit (“Ename”).Set “Pavan” Vbwindow (“Emp”).VbEdit (“Eage”).Set “24” Vbwindow (“Emp”).VbEdit (“Esal”).Set “40,000” Vbwindow (“Emp”).VbEdit (“Edesig”).Set “Test Lead” Vbwindow (“Emp”).Vbbutton(“Submit”).Click Add – In – Manager Add in manager is a feature providing Q.T.P, used for making the Q.T.P compatible with the specified environment. By default Add-In-Manager contain 3 Add Ins. 1. Visual Basic 2. Active x. 3. Web. Q.T.P is always compatible with standard windows environment apart from the above add ins any other add in is required one need to purchase it by paying extra cost. Q.T.P screen can be divided into 5 parts. 1. Test Pane 2. Active Screen 3. Data Table 4. Debug Viewer Pane 5. Tool Options
1). Test Pane Test pane is an area provided by Q.T.P, which is used for developing, viewing and modifying the test script. It represents the Test script in 2 views. 1. Expert view 2. Keyboard view Expert view. Expert view represents the script in VB script format.
Keyboard View It represents the scripts using a graphical user interface, which is further divided, into 4 parts. 1. 2. 3. 4.
Item Operation Value Documentation
2) Active Screen Active Screen is a feature provided by Q.T.P which holds the snap shots related to each and every script statement and used for understanding the script easily as well as enhancing the script easily. 3) Data Table Data table is also called as formula1 sheet, which is developed by the third party and integrated with the Q.T.P. Features: 1. It is used for holding the Test Data. 2. It provides the facility to import the test data very easily from the different data sources like Excel files, Data bases and Flat files. 3. It allows the user directly to enter data and modify the data. 4. It isolates (Separate) the test script from the data source. Note:
Q.T.P maintains two copies of Data Table. 1. Design time data table. 2. Run time data table.
4) Debug Viewer Pane Debug Viewer Pane is an area provided by Q.T.P which is used for Viewing, Modifying or Setting the current values of the variable or expressions during the execution brake with the help of three tabs by name Watch Expression, Variable and Commands. 5) Tool Options The options available in Manu bar, File Toolbar, and Testing Toolbar are known as Tool options.
Recording and Running Recording and Run Settings: Recording and Run Setting is a feature provided by Q.T.P, which is used for making the Q.T.P understand on which applications will need to concentrate while Recording and Running. This settings has to be done at least once for every new test. Operational Overview of Recording. During recording Q.T.P will be during we following 1. It will generate the corresponding test script statement for every user action. 2. It will also store the required related information in the object repository. Operational Overview of Running. Q.T.P will be doing the following will be running 1. It will be read the script statement. 2. It will understand what action to be perform on which object. 3. When it is realizes it need to identify that object for that it require some information for that information it will go to the object repository and search. 4. once the information is identified using that information it will try to identify the object. 5. Once the object is identify it will perform the action Recording Modes There are 3 types of recording modes. 1. Contact sensitive recording mode / normal recording mode. 2. Analog recording mode. 3. Low-level recording mode. 1) Normal recording It is used for recording the operations perform at different contacts on the standard GUI objects. 2) Analog Recording It is used for recording the continuous operations. 3) Low-level Recording It is special recording mode provided by Q.T.P, which is used for recording the minimum operations on the Non-Supported environments also.
Q . T. P L i f e C yc l e
1. Test plan 2. Generating the basic test 3. Enhancing the test 4. Debugging the test 5. Executing the test 6. Analyzing the results. 1) Test Planning In this phase the automation test lead will do the following 1. 2. 3. 4. 5.
Understand the requirements Identify the areas to be automated. Analyze both the positive and negative flow of those areas. Based on the above analysis he will prepare the automation test plan document. He will prepare the tool ready with all the pre configurational settings for further operations.
2) Generating the Basic Test In this phase the automation test engineer will generate the basis test for both the positive and negative flow of the test. 3) Enhancing the test One can enhance the test in the following ways. 1. Inserting the checkpoints. 2. Synchronizing the test. 3. Parameter zings the test (Data Driven Testing). 4. Inserting the output values. 5. Measuring transactions. 6. Inserting programmatic statements. 7. Inserting comments. 8. Inserting the script statement manually.
1) Inserting the checkpoints. Checkpoint: Checkpoint is defined as validation point or test point which checks the object or bitmap state or data state during the execution at any point of time. Operational over view of checkpoint. The checkpoint works in two phases. 1. Pre execution phase. 2. While execution phase. 1) Pre execution phase. It captures the expected value Generates the corresponding test script statement. 2) While execution phase. It captures the actual value. Compares the expected value with the actual value. Displays the results. Types of Checkpoints 1. Standard checkpoint 2. Bit map checkpoint 3. Text checkpoint 4. Text area checkpoint 5. Data base checkpoint 6. XML checkpoint 7. Page checkpoint 8. Table checkpoint 9. Image checkpoint 10. Accessibility checkpoint
1) Standard checkpoint. It is used for checking the properties values on standard GUI values. It can be inserted in 2 ways. Through application
Through active screen 2) Bitmap checkpoint. It is used for checking the complete bitmap or a part of a Bitmap. It cam be inserted in 2 ways. Through the application. Through the active screen. 3) Text Checkpoint It is used for checking the Text present on a object. It can be inserted through application as well as through active screen. 4) Text Area Checkpoint It is used for checking the test present in a specified area. It can be inserted only through application but not through active screen. 5) Data Base Check Point It is used for checking the contents of a database. 6) XML (Extended Markup Language) Checkpoint It is used for checking the contents of an XML file. It is a universally understandable language and used for data transformations. Web Checkpoints 7) Page Checkpoint It is used for checking the properties of a web page like Load time, Number of Links and number of Images. 8) Table Checkpoint: It is used for checking the contents of a web table. 9) Image Checkpoint 10) Accessibility Checkpoint It is used for checking whether the page can be accessible by more number of people or not. In order to check the same actually it checks whether the page is developed according to the WWW (world wide web Consorted) standards or not.
Synchronizing Test Synchronization: It is a process of matching the speeds of both the tool and application in order to keep them in sink with each other to obtain proper testing results. Here the main concept is making the tool to wait that can be done in 3 ways. 1. Inserting the synchronizing point. 2. Increasing the default time. 3. Inserting the wait statement.
Syntax: Object high rarity. Wait property “ Property name”. Property Value, Extra time in milliseconds.
Ex: Window (“Flight Reservation”). Window Button (“Delete Order”). Wait Property “Enabled”, True, 16000. Inserting the wait statement. One can insert the wait statement directly in script in desired location. Syntax:
Wait (Sec).
Ex:
Wait (20).
DATA DRIVEN TESTING It is a concept introduced in automation in order to implement Re-Testing. Steps to be followed to Data Driven Testing. Collect the data in to the data table Generate the Basic test. Execute the Test. Analyze the Results. Parameterization: It is a process of replacing the constant values with the variables or parameters in order to increase the scope of the test. Parameterization can be driven. 1. Through Data Driven Wizard. 2. Keyword View. 3. Manually. In the same way one can parameterized all the constant values and finally click on Ok. In order to avoid the above navigations one can directly parameterized manually as follows. Ex: A = data table (“V1”,1) Vbwindow (“form1”). Vbedit (“val1”). Set a. Vbwindow (“form1”). Vbedit (“val2”). Set data table (“v2”, 1) Vbwindow (“form1”). Vbbutton (“Add”). Click 4) Output Value: It is a feature provided by Q.T.P, which is used, for capturing a value from an application or from a database or from a XML file and stored it under a specified column in the run time data table during execution. To do the same Q.T.P as provided 5 types of output values. 1. Standard output value. 2. Text output value. 3. Text area output value. 4. Database output value. 5. XML output value. Operational over view of output values. Output value feature works in 2 phases 1. Pre-Execution phase. 2. While – Execution phase. 1).Pre-Execution phase: Captures the field name from where the value is to be captured. Generates the corresponding script statement. 2) While execution phase: Captures the actual value form the field. Stores it under a specified column in the run time data table.
5) Measuring Transactions: It is a concept provided by Q.T.P, which is used for calculating the time taken by an application to perform a specific task or the execution time of a block of script statements. To do the same Q.T.P has provided 2 options. 1. Start Transactions. 2. End Transactions. Navigation through inserts Transaction points. Keep the cursor in the desired location. Activate the menu item insert. Select the option start Transactions Specify the Transaction name. Select one of the following options o Before current step. o After current step. Click on Ok.
In order to avoid the above navigation one can insert the following statements directly into the script Services. Start transaction “ Transaction Name” ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Services. End transaction “Transaction Name”. 6) Inserting Programmatic Statements. Vb script is a combination of 5 types of programmatic statements. 1. Normal statements / Objects 2. Conditional statements. 3. Looping 4. Comments 5. Utilities Statements. Reporter utility object It is used for reporting and user defined messages to the result window in order to understand the result better. Syntax: Reporter. Report event status, “Report name”, “message”. Ex: Reporter. Report event 2 / micdone, “Myrep”, “Add oper is successful”. One can replace the status in following numbers 0 – Pass 1 – Fail 2 – Done 3 – Warning. 4) Debugging the Test. Debugging: It is a process of executing the script or a program in a user desired fashion with same temperare breaks in order to identify the errors. To do the same Q.T.P has provided 3 step commands and a break point feature.
Step Commands: 1). Step Into It is used for executing a single step. If it is normal statement If that statement is function or action call statement then it will step into that function or action and breaks it’s execution. 2) Step Out It is used for stepping out of a function or action by executing all the remaining statements from the position of the pointer. 3) Step Over It is used for executing a single step if it is normal statement. If the statement is function call or action call it will execute all the statement inside the function or action once and stops it’s execution at the next statement. 4) Break point It is a feature provided by Q.T.P used for breaking the execution temporarily. Ex: Function Myfun() Msgbox “ hai” Msgbox “hellow” Msgbox “h r u” End statement Myfun() Myfun() Msgbox “bye“ Myfun() Msgbox “See U” Debug Viewer Pan It is an area provided by Q.T.P which is used for viewing, modifying or setting the current values of the variables or expressions during the execution break with the help of 3 tabs by name. 1. Watch expression 2. Variables 3. Commands Ex: Dim a A=10 B=20 Msgbox a Msgbox a Msgbox a 5) Executing the Test: In this phase one will execute the Test. 6) Result Analysis In this phase one will analyze the Results.
-: The End :-
Pls. leave your feed back (both +ve and –ve ) at
[email protected]