0%

Book Description

With test automation becoming the norm, this is an essential course in framework designing with QTP. Mixing conceptual and practical elements, it imparts all the know-how you need to implement the framework.

  • A simple and easy demonstration of the important concepts will enable you to translate abstract ideas into practice
  • Each chapter begins with an outline and a brief statement of content to help the reader establish perspective
  • An alternative approach to developing generic components for test automation

In Detail

As software testing is maturing, the focus is shifting towards test automation. The key is to learn and grow skills in framework designing and start contributing to project organization goals.

Through a helpful mix of conceptual and practical aspects, you will learn everything you need to know related to the implementation of frameworks using QTP. Through simple examples, you will gradually develop the skills needed to execute concepts and code blocks used to design and implement the test automation framework.

This tutorial-based guide demonstrates an easy way to implement concepts to create a portable framework across the various versions of QTP. You will learn about the automation lifecycle and gradually develop technical concepts related to each phase. Within a short amount of time, you will be able to deal with challenges in test automation. "Designing and Implementing Test Automation Frameworks with QTP" uses a simple, yet elegant approach and gives the reader all the skills and knowledge they need to implement the framework.

Table of Contents

  1. Designing and Implementing Test Automation Frameworks with QTP
    1. Table of Contents
    2. Designing and Implementing Test Automation Frameworks with QTP
    3. Credits
    4. About the Author
    5. Acknowledgments
    6. About the Reviewers
    7. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
        3. Instant Updates on New Packt Books
    8. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    9. 1. Automation Life Cycle and Automation Goals
      1. The test automation life cycle
        1. Feasibility study
        2. Tool induction for automated testing
        3. Defining a test automation strategy
        4. Creating a automation test plan
        5. Script design and development
        6. Deployment, release, and maintenance
        7. Tool selection
          1. Capturing automation requirements
          2. Developing a POC
          3. Evaluating the tools
        8. Tool selection criteria
        9. Processes
        10. Design, architecture, and documentation
        11. Automation goals
          1. Goals for test automation
          2. Goals for framework design
          3. Goals for design
          4. Goals for script design
          5. Setting quantifiable goals
        12. Best practices
          1. Choosing the most suitable tool for automation
          2. Treating test automation as a development activity
          3. Getting the right architecture
          4. Ensuring relevant and up-to-date test data
          5. Investing in team building and training
          6. Conducting reviews and tests
      2. Summary
    10. 2. Essentials of Automation
      1. About QTP
      2. The QuickTest object model
      3. Test objects
      4. Object repositories
      5. Record and replay
        1. What happens when we record
        2. What happens when we replay
      6. Script development
        1. Analyzing an application
        2. Creating OR (adding test objects to OR)
          1. Recording a test step
          2. Adding a test object to OR
          3. Creating an object description
          4. Creating a test object using Define New Test Object
          5. OR Manager Navigate and Learn and Add Object options
            1. The Navigate and Learn toolbar
            2. Adding a test object using the OR Manager Add Object option
          6. Adding test objects to the local object repository from Active Screen
        3. Adding a test step
        4. Enhancing scripts
          1. Checkpoints
          2. Synchronization
            1. Exist statements
          3. Reporter objects
            1. The Reporter.RunStatus object
          4. Actions
            1. Purpose of actions
            2. Types of actions
          5. Error handling
          6. Parameterization
          7. Environment Variables
      7. Summary
    11. 3. Basic Building Blocks for Creating Frameworks
      1. VBScript – key features for creating code blocks
        1. VBScript procedures
          1. Subprocedures
          2. Function procedures
      2. Checkpoints
      3. Output value
      4. Synchronization
        1. Dynamic synchronization
      5. Descriptive programming
        1. Static programming
        2. Dynamic programming
      6. Regular expressions
        1. Regular expressions in descriptive programming
        2. Regular expressions in checkpoints
        3. Regular expressions in CheckProperty
      7. Error handling
      8. Recovery scenarios – an overview
      9. Summary
    12. 4. Understanding and Creating Frameworks
      1. Programming with VBScript
        1. Using VBScript
        2. VBScript datatypes
        3. Operators in VBScript
          1. Adding examples of expressions
        4. Control structures and loops
        5. Using loops
          1. The Do Loop
      2. Introducing frameworks
        1. The automation framework and types of framework
        2. Record and replay
        3. Advantages and disadvantages of linear a framework
      3. Introduction to the data-driven framework
        1. The FileSystemObject object model
      4. Introduction to the modular framework
        1. Structure
          1. Advantages
        2. Design
          1. High cohesion and coupling
          2. Decreasing coupling and increasing cohesion
          3. Analyzing the application
          4. Creating a design
          5. Setting up an environment
          6. Creating Object Repository
          7. Creating test-level components
          8. Creating script-level functions
          9. Integrating design elements
          10. Test the framework design
        3. Advantages of modular frameworks
        4. Challenges for modular frameworks
      5. The keyword-driven framework
        1. The keyword-driven testing approach
          1. Decomposition
          2. Recombination
          3. The keyword-driven or test-plan driven method
          4. Generic flow in keyword-driven approach
        2. Advantages of the keyword-driven approach
          1. Cost effectiveness
          2. Reusability
          3. Ease of maintenance
          4. Ease of execution
        3. Key challenges
      6. The hybrid framework
        1. Advantages of the hybrid framework
        2. Key challenges
      7. Business Process Testing
      8. Application-independent framework
        1. Advantages of the application-independent framework
        2. Key challenges of the application-independent framework
      9. Summary
    13. 5. Deploying and Maintaining Frameworks
      1. Predeployment
        1. Debugging with QTP
          1. Run to step
          2. Debug from step
          3. Run from step
          4. Run from action
          5. Debug from action
          6. Run to action
          7. Debugging a functional library
          8. Reviewing the checklist for predeployment
        2. Custom logs
          1. Enabling logging
          2. Disabling logs
          3. Filtering logs
          4. The test version versus the debug version
        3. Deployment
      2. Maintenance
        1. Script/library maintenance
        2. Automation test repository maintenance
          1. The Maintenance Run mode
          2. The Update Run mode
        3. Enhancement
      3. Summary
    14. 6. DOM- and XPath-based Framework in Web Applications
      1. Document Object Model
        1. HTML DOM
          1. Node relationships – parents, children, and siblings
        2. JavaScript and DOM
          1. Finding HTML elements
          2. Finding HTML elements by ID
          3. Finding HTML elements by tag name
          4. Finding HTML elements by name
          5. Finding HTML elements by className
          6. Changing the HTML content
          7. Changing the HTML attribute
          8. Changing the HTML style
          9. Responding to an event
          10. Creating new HTML elements
          11. Removing an existing HTML element
        3. DOM and QTP
          1. Firing an event
      2. Using XPath
        1. XPath terminology
        2. Selecting nodes
        3. Predicates
        4. Selecting unknown nodes
        5. Selecting several paths
        6. Axes in XPath
        7. Locating a element using location path
        8. Operators in XPath
      3. Summary
    15. 7. Capturing the Lessons Learned
      1. Preparing for the lessons to be learned
      2. Collecting and documenting learning
        1. Key challenges
        2. What went well
        3. What can be better
      3. Best practices for collecting lessons learned
        1. Start capturing early
        2. Documentation and ensuring reusability
      4. Discussing lessons learned
      5. Storing and sharing lessons learned
      6. Summary
    16. Index
18.219.95.244