Final Automation Testing

6,893 views

Published on

0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
6,893
On SlideShare
0
From Embeds
0
Number of Embeds
88
Actions
Shares
0
Downloads
317
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide
  • Framework 1: Test Script Modularity The test script modularity framework is the most basic of the frameworks. It's a well-known programming strategy to build an abstraction layer in front of a component to hide the component from the rest of the application. This insulates the application from modifications in the component and provides modularity in the application design. When working with test scripts (in any language or proprietary environment) this can be achieved by creating small, independent scripts that represent modules, sections, and functions of the application-under-test. Then these small scripts are taken and combined them in a hierarchical fashion to construct larger tests. The use of this framework will yield a higher degree of modularization and add to the overall maintainability of the test scripts Framework 2 : Test Library Architecture The test library architecture framework is very similar to the test script modularity framework and offers the same advantages, but it divides the application-under-test into procedures and functions (or objects and methods depending on the implementation language) instead of scripts. This framework requires the creation of library files (SQABasic libraries, APIs, DLLs, and such) that represent modules, sections, and functions of the application-under-test. These library files are then called directly from the test case script. Much like script modularization this framework also yields a high degree of modularization and adds to the overall maintainability of the tests.
  • Final Automation Testing

    1. 1. Understanding of Automation Testing and Automation Framework What is Automation Testing? Automation Testing is a process where software or an Automation Tool is used to execute test scripts in a controlled and desired manner to compare the expected result with the actual result. In general terms Automation Testing involves automating a manual process which is already in place in the testing process. Automation Fundamental Concepts Prepared By: Priya Trivedi
    2. 2. Automation Fundamental Concepts <ul><li>Automation life cycle is a subset of the entire test life cycle… </li></ul><ul><li>Automation planning can be initiated in parallel to the test planning phase… </li></ul><ul><li>Factors to be considered in automation planning, </li></ul><ul><ul><li>Stability of AUT (Application under test) </li></ul></ul><ul><ul><li>No of regression cycles to be performed </li></ul></ul><ul><ul><li>Compatibility of App platform with testing tools </li></ul></ul><ul><ul><li>Cost benefit analysis (ROI) </li></ul></ul><ul><ul><li>Availability of skilled resources </li></ul></ul><ul><li>When Automation is applicable? </li></ul><ul><ul><li>Regression Testing Cycles are long and iterative. </li></ul></ul><ul><ul><li>If the application is planned to have multiple releases / builds </li></ul></ul><ul><ul><li>If it’s a long running application where in small enhancements / Bug Fixes keeps happening </li></ul></ul><ul><ul><li>Test Repeatability is required </li></ul></ul>
    3. 3. The Benefits/Purpose of Automation testing <ul><li>Speed up Test Execution: In less span of time you can run more no of test scripts which not only reduces the time but also speeds up the execution task. </li></ul><ul><li>Achieved Improved Test Coverage: Your coverage is more than what you could do manually. </li></ul><ul><li>Ensures Consistency, Accuracy and Efficiency: The tests run are consistent, accurate and efficient. </li></ul><ul><li>Reliability and Transparency: The tests can perform the exact same steps every time without concern about human error. </li></ul><ul><li>Repeatability and Reusability: Once you automate your test cases i.e. you convert the test cases into test scripts they can be run any number of times since they are stored and they can be reused at a later point of time when needed. </li></ul><ul><li>Return on Investment (ROI) </li></ul><ul><li>Quality </li></ul>
    4. 4. What Should Be Automated <ul><li>Good candidates </li></ul><ul><ul><li>Tests executed for each build </li></ul></ul><ul><ul><li>Business critical tests </li></ul></ul><ul><ul><li>Tests that are difficult/tedious to perform manually </li></ul></ul><ul><li>Bad candidates </li></ul><ul><ul><li>Tests without predictable results </li></ul></ul><ul><ul><li>Test that require variable input/responses from the tester </li></ul></ul><ul><ul><li>Tests that perform operations in multiple environments </li></ul></ul>
    5. 5. Automation Tools? WATIR TestPartner TestComplete SilkTest Selenium IBM Rational Functional Tester HP QTP Tool Name Open Source Tool Micro Focus Automated QA Micro Focus Open Source Tool IBM Rational HP Company Name 1.6.5 6.3 7.52 2009 1.0.1 8.1.0.0 10.5 Latest Version
    6. 6. Introduction to Test Automation Framework <ul><li>What an Automation Framework is ? </li></ul><ul><li>How many types of Automation Framework are there ? </li></ul><ul><li>How to select & Deploy an Automation Framework ? </li></ul><ul><li>What are the Constituents of Automation Framework ? </li></ul>Areas covered Include:
    7. 7. What a Test Automation Framework is ? <ul><li>It is a structured combination of : </li></ul><ul><li>Various Assumptions for Testing </li></ul><ul><li>Testing Concepts </li></ul><ul><li>Testing Practices </li></ul>Aim is to provide support to Automated Software Testing
    8. 8. Utility of Test Automation Framework <ul><li>Provides an Outline of overall Test Structure </li></ul><ul><li>Ensures Consistency of Testing </li></ul><ul><li>Minimizes the Amount of Code for Development - thereby Less Maintenance </li></ul><ul><li>Maximizes Reusability </li></ul><ul><li>Reduces Exposure of Non-Technical Testers to Code </li></ul><ul><li>Enables Test Automation using Data </li></ul>
    9. 9. How Many Types of Automation Frameworks are there ? <ul><li>Data Driven Automation Framework </li></ul><ul><li>Keyword Driven Automation Framework </li></ul><ul><li>Modular Automation Framework </li></ul><ul><li>Hybrid Automation Framework </li></ul>Generally there are 4 Types :
    10. 10. Data Driven Automation Framework <ul><li>Advantages: </li></ul><ul><li>Repeated use of Test Scripts with Different Inputs and Response Data coming out of Predefined Dataset </li></ul><ul><li>Helps in Reducing Coding for Large Test Cases </li></ul><ul><li>Ease of Testing of Time-Consuming & Complex Test Cases </li></ul>
    11. 11. Data Driven Automation Framework <ul><li>Data-driven testing is a framework where test input and output values are read from data files (datapools, ODBC sources, csv files , Excel files, DAO objects, ADO objects, and such) and are loaded into variables in captured or manually coded scripts. </li></ul><ul><li>In this framework, variables are used for both input values and output verification values. </li></ul><ul><li>The test scripts contain all the coded information regarding reading of the data files, navigation through the application & test status logs etc. </li></ul><ul><li>This has a similarity with table-driven testing in a way that our test case is encapsulated in the data file as against in the test script. The test script just remains a &quot;driver,&quot; or a means of delivery for the data. Here in data-driven testing, data files contain just the test data only. </li></ul>
    12. 12. Continue……….. <ul><li>Merits of data-driven testing </li></ul><ul><li>Scripts may be developed while application development is still in progress </li></ul><ul><li>Utilizing a modular design, and using files or records to both input and verify data, reduces redundancy and duplication of effort in creating automated test scripts </li></ul><ul><li>If functionality changes, only the specific &quot;Business Function&quot; script needs to be updated </li></ul><ul><li>Data input/output and expected results are stored as easily maintainable text records. </li></ul><ul><li>Functions return &quot;TRUE&quot; or &quot;FALSE&quot; values to the calling script, rather than aborting, allowing for more effective error handling, and increasing the robustness of the test scripts. This, along with a well-designed &quot;recovery&quot; routine, enables &quot;unattended&quot; execution of test scripts. </li></ul><ul><li>Demerits of data-driven testing </li></ul><ul><li>Requires proficiency in the Scripting language used by the tool (technical personnel) </li></ul><ul><li>Multiple data-files are required for each Test Case. There may be any number of data-inputs and verifications required, depending on how many different screens are accessed. This usually requires data-files to be kept in separate directories by Test Case </li></ul><ul><li>Tester must not only maintain the Detail Test Plan with specific data, but must also re-enter this data in the various required data-files </li></ul><ul><li>If a simple &quot;text editor&quot; such as Notepad is used to create and maintain the data-files, careful attention must be paid to the format required by the scripts/functions that process the files, or script-processing errors will occur due to data-file format and/or content being incorrect </li></ul>
    13. 13. Keyword Driven Automation Framework <ul><li>Attributes: </li></ul><ul><li>As the Name suggests, it enables Keyword Driven Testing or Table Driven Testing </li></ul><ul><li>Data & Keyword Tables being Independent of the Automation Tool </li></ul><ul><li>Enables Documentation of the Functionality of the Application under Test (AUT) in A Tabular Format </li></ul>
    14. 14. Keyword-driven testing is a Software testing technique that separates much of the programming work from the actual test steps so that the test steps can be developed earlier and can often be maintained with only minor updates, even when the application or testing needs change significantly. The Keyword Driven framework consists of the basic components given below 1. Control File 2. Test Case File 3. Startup Script 4. Driver Script 5. Utility Script Keyword Driven Automation Framework
    15. 15. <ul><li>Control File </li></ul><ul><ul><li>Consists details of all the Test scenarios to be automated </li></ul></ul><ul><ul><li>User will be able to select a specific scenario to execute based on turning on or off a flag in the Control File </li></ul></ul><ul><ul><li>Control File is in the form of an excel worksheet and contains columns for Scenario ID, Execute (Y/N), Object Repository Path, Test Case File Path </li></ul></ul><ul><li>Test Case File </li></ul><ul><ul><li>Contains the detailed steps to be carried out for the execution of a test case </li></ul></ul><ul><ul><li>It is also in the form of an excel sheet and contains columns for Keyword, Object Name, Parameter </li></ul></ul><ul><li>Startup Script </li></ul><ul><ul><li>The Startup script is utilized for the initialization and reads the control files </li></ul></ul><ul><ul><li>It then calls the driver script to execute all the scenarios marked for execution in the control file </li></ul></ul><ul><li>Driver Script </li></ul><ul><ul><li>It Reads the Test Case files. Checks the keywords and calls the appropriate utility script functions based on specific keyword </li></ul></ul><ul><ul><li>Error Handling is taken care of in the driver script. </li></ul></ul><ul><li>Utility Scripts </li></ul><ul><ul><li>Perform generic tasks that can be used across applications. It should not be application dependent </li></ul></ul>Keyword Driven Automation Framework
    16. 16. <ul><li>Advantage of Framework. </li></ul><ul><ul><li>The main advantage of this framework is the low cost for maintenance. If there is change to any test case then only the Test Case File needs to be updated and the Driver Script and Startup script will remain the same. </li></ul></ul><ul><ul><li>No need to update the scripts in case of changes to the application </li></ul></ul><ul><li>Disadvantages of keyword driven testing: </li></ul><ul><ul><li>Development of &quot;customized&quot; (Application-Specific) Functions and Utilities requires proficiency in the tool’s Scripting language. (Note that this is also true for any method) </li></ul></ul><ul><ul><li>If application requires more than a few &quot;customized&quot; Utilities, this will require the tester to learn a number of &quot;Key Words&quot; and special formats. This can be time-consuming, and may have an initial impact on Test Plan Development. Once the testers get used to this, however, the time required to produce a test case is greatly improved. </li></ul></ul>Keyword Driven Automation Framework
    17. 17. Modular Automation Framework <ul><li>Attributes: </li></ul><ul><li>As the Name suggests, it enables Keyword Driven Testing or Table Driven Testing </li></ul><ul><li>Data & Keyword Tables being Independent of the Automation Tool </li></ul><ul><li>Enables Documentation of the Functionality of the Application under Test (AUT) in A Tabular Format </li></ul>
    18. 18. <ul><li>Test Script Modularity Framework: Enables creation of Small, Independent Scripts representing Modules & Functions of the Application under Test (AUT). The use of this framework will yield a higher degree of modularization and add to the overall maintainability of the test scripts </li></ul><ul><li>Test Library Architecture Framework: Enables creation of Library Files representing Modules & Functions of the Application under Test (AUT). This framework requires the creation of library files (SQABasic libraries, APIs, DLLs, and such) that represent modules, sections, and functions of the application-under-test. These library files are then called directly from the test case script. Much like script modularization this framework also yields a high degree of modularization and adds to the overall maintainability of the tests. </li></ul>Types of Modular Frameworks :
    19. 19. Hybrid Automation Framework <ul><li>Attributes: </li></ul><ul><li>It is the Most Popularly Implemented Framework </li></ul><ul><li>It is a Combination of the Three Types of Frameworks described before </li></ul><ul><li>It has an Ability of Evolving Itself Over a Passage of Time and Over Many Projects </li></ul>
    20. 20. <ul><li>This hybrid test automation framework is what most frameworks evolve into over time and multiple projects. </li></ul><ul><li>The most successful automation frameworks generally accommodate both Keyword-Driven testing as well as Data-Driven scripts. This allows data driven scripts to take advantage of the powerful libraries and utilities that usually accompany a keyword driven architecture. </li></ul><ul><li>The framework utilities can make the data driven scripts more compact and less prone to failure than they otherwise would have been. </li></ul><ul><li>The utilities can also facilitate the gradual and manageable conversion of existing scripts to keyword driven equivalents when and where that appears desirable. </li></ul><ul><li>On the other hand, the framework can use scripts to perform some tasks that might be too difficult to re-implement in a pure keyword driven approach, or where the keyword driven capabilities are not yet in place. </li></ul>Hybrid Automation Framework
    21. 21. How to Implement Test Automation Framework Methodology? 10 Steps to Implement Automation Framework Approach
    22. 22. Steps to Implement Automation Framework Approach <ul><li>1) Identification of the Scope of Testing: Company Oriented, Product Oriented, Project Oriented </li></ul><ul><li>2) Identification of the Needs of Testing: Identify Types of testing e.g. FT, Web Services etc. and application / modules to be tested </li></ul><ul><li>3) Identification of the Requirements of Testing: Find out the Nature of Requirements, Identification of type of actions for each requirement & identification of High Priority Requirements </li></ul><ul><li>4) Evaluation of the Test Automation Tool: Preparation of Evaluation Checklist, Identification of the Candidate Tools vailable, Sample Run, Rate & Select the Tool, Implementation & Training </li></ul><ul><li>5) Identification of the Actions to be automated: Actions, Validations & Requirements supported by the Tool </li></ul>
    23. 23. Steps to Implement Automation Framework Approach <ul><li>6) Design of the Test Automation Framework: Framework Guidelines, Validations, Actions Involved, Systems Involved, Tool Extensibility Support, Customs Messages & UML Documentation </li></ul><ul><li>7) Design of the Input Data Bank: Identification of Types of Input file, Categorization & Design of File Prototypes </li></ul><ul><li>8) Development of the Automation Framework: Development of Script based upon Framework Design, Driver Scripts, Worker Scripts, Record / Playback, Screen / Window / Transaction, Action / Keyword & Data Driven </li></ul><ul><li>9) Population of Input Data Bank: Different Types of Data Input, Population of Data from Different Data Sources, Manual Input of Data and Parent – Child Data Hierarchy </li></ul><ul><li>10) Configuration of the Schedulers: Identify Scheduler Requirements & Configure the Schedulers </li></ul>
    24. 24. Benefits of Automation Framework Approach <ul><li>Significant Reduction in Testing Cycle Time </li></ul><ul><li>Comprehensive Coverage against Requirements </li></ul><ul><li>Use of a &quot;Common Standard&quot; across the Organization / Product Team / Project Team </li></ul><ul><li>Generation of Reusable Test Scripts ( Utility Functions) </li></ul><ul><li>Systematic Maintenance of Automation Scripts </li></ul><ul><li>Data Pooling </li></ul>

    ×