Designing Reusable Frameworks for Test Automation

Slides:



Advertisements
Similar presentations
Configuration management
Advertisements

Configuration management
xUnit Test Patterns (Some) xUnit Test Patterns (in practice) by Adam Czepil.
PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.
Test Automation: Coded UI Test
Unit 6 Assignment 2 Chris Boardley.
Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
HP Quality Center Overview.
Key-word Driven Automation Framework Shiva Kumar Soumya Dalvi May 25, 2007.
Test Automation An Approach to Automated Software Regression Testing Presented by Adnet, Inc Feb 2015.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
1 A Student Guide to Object- Orientated Development Chapter 9 Design.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 16 Slide 1 User interface design.
© 2006, Cognizant Technology Solutions. All Rights Reserved. The information contained herein is subject to change without notice. Automation – How to.
September 2009 QTP Automation Framework. Objective  Introduction to Automation  Benefits of Automated Testing  Automated Testing Process  Introduction.
NYC Technology Forum Introduction to Test Automation 11/2/07 All rights reserved Not to be reproduced without permission Bill Rinko-Gay Solutions Director,
Who am I? ● Catalin Comanici ● QA for 10 years, doing test automation for about 6 years ● fun guy and rock star wannabe.
Chapter 1 Database Systems. Good decisions require good information derived from raw facts Data is managed most efficiently when stored in a database.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 27 Slide 1 Quality Management.
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
Design Patterns.
Manage Engine: Q Engine. What is it?  Tool developed by Manage Engine that allows one to test web applications using a variety of different tests to.
What is Software Engineering? the application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software”
What is QTP ► QTP stands QuickTest Professional ► It is an automated testing tool provided by HP/Mercury Interactive ► QTP integrates with other Mercury.
Chapter 2 소프트웨어공학 Software Engineering 임현승 강원대학교
Team Skill 6: Building the Right System From Use Cases to Implementation (25)
Teaching material for a course in Software Project Management & Software Engineering – part II.
Chapter 6 : Software Metrics
1 Software Development Configuration management. \ 2 Software Configuration  Items that comprise all information produced as part of the software development.
Components of Database Management System
Design and Programming Chapter 7 Applied Software Project Management, Stellman & Greene See also:
CSC 395 – Software Engineering Lecture 12: Reusability –or– Programming was Bjarne Again.
Reusability and Effective Test Automation in Telecommunication System Testing Mikael Mattas Supervisor: Professor Sven-Gustav Häggman Instructor: B.Sc.
Exploring an Open Source Automation Framework Implementation.
Design engineering Vilnius The goal of design engineering is to produce a model that exhibits: firmness – a program should not have bugs that inhibit.
Basic of Software Testing Presented by The Smartpath Information System An ISO 9001:2008 Certified Organization
SE: CHAPTER 7 Writing The Program
Sylnovie Merchant, Ph.D. MIS 161 Spring 2005 MIS 161 Systems Development Life Cycle II Lecture 5: Testing User Documentation.
Configuration Management and Change Control Change is inevitable! So it has to be planned for and managed.
CASE (Computer-Aided Software Engineering) Tools Software that is used to support software process activities. Provides software process support by:- –
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
HNDIT23082 Lecture 06:Software Maintenance. Reasons for changes Errors in the existing system Changes in requirements Technological advances Legislation.
CSC 480 Software Engineering Test Planning. Test Cases and Test Plans A test case is an explicit set of instructions designed to detect a particular class.
MTA EXAM Software Testing Fundamentals : OBJECTIVE 6 Automate Software Testing.
Software Quality Assurance and Testing Fazal Rehman Shamil.
Refactoring Agile Development Project. Lecture roadmap Refactoring Some issues to address when coding.
Copyright © , Dennis J. Frailey, All Rights Reserved Day 2, Part 1, Page 1 1/11/2004 Day 2, Part 1 Estimating Software Size Section 2 Calculating.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
Module 3: Operating-System Structures
Leverage your Business with Selenium Automation Testing
CIM Modeling for E&U - (Short Version)
Software Testing.
Coupling and Cohesion 1.
Chapter 18 Maintaining Information Systems
Applied Software Implementation & Testing
Advantages OF BDD Testing
Sharing the good, the bad, the ugly & What can we do about it?
Chapter 13 Quality Management
Unit 6 Assignment 2 Chris Boardley.
Chapter 1 Introduction(1.1)
Course: Module: Lesson # & Name Instructional Material 1 of 32 Lesson Delivery Mode: Lesson Duration: Document Name: 1. Professional Diploma in ERP Systems.
Chapter 2: Operating-System Structures
Outline Chapter 2 (cont) OS Design OS structure
MORE ON ARCHITECTURES The main reasons for using an architecture are maintainability and performance. We want to structure the software into reasonably.
Strategy Design Pattern
Lecture 06:Software Maintenance
Chapter 2: Operating-System Structures
Presentation transcript:

Designing Reusable Frameworks for Test Automation Presenter: Byron Goodman National Director of Quality Assurance Neudesic

Overview Some thoughts on automation Successful test automation Components of a framework Some coding standards Standard routines

Automated Testing: Why We Love It Let the machines do the tests Easy to create alternate scenarios by leveraging existing tests Using tools can create more interest in testing activities Potential to reduce testing cycle time Effective at catching regression bugs

Automated Testing: Why We Hate It Tests break too often! Pass or fail results may not be reliable Tools are expensive, although there are some good open source solutions Tools may oversimplify or overcomplicate the degree of effort required to test applications

Have you Experienced Any of These Symptoms? More time spent working on automated tests than time needed to do the manual testing Sporadic interest in implementing automated testing Statements by others that automated testing is: a sham, ineffective, waste of time Shelving of test automation in the interest of project success

What is Successful Test Automation? As with all project related work, the time spent creating automated testing must offset this effort by the return of value. This is demonstrated in various ways: Less time expended during the testing cycle than if manual testing is the only solution More thorough and consistent regression coverage Reduce human error and boredom Frees up people to test new functionality while computers test existing functionality

Basics of Beginning Strategy – start simple and work towards a more complete and complex solution Timing – start using tests as soon as they are written, Do not wait for a completed suite Buy-in – Demonstrate to others that each test does exactly what it is intended to so that there is confidence in results Traceability – Each automated test must trace back to a specific automated test

Start Somewhere Generally speaking, some automated testing is better than no automated testing Select the most simple of tests to automate Begin by using record and playback to minimize time investment but to show that the tool does prove to be effective

Record and Playback For years, I have insisted that no tests will be created using record and playback I will admit that there is a place for R&P Very light use to prove out the tool and to minimize the reluctance people may have to use complicated technology However, R&P is does not have much gain in efficiencies over manual testing

Testing Framework Many of us have experience with testing frameworks Other names– DLLs, namespace, test library Its just a fancy name for code that is used to automate tests A testing framework is a set of routines that are reused by tests that will speed up test development while increasing test reliability

Testing Framework Goals Needs to be recognized to have the same rigor as any development effort Adds value to the overall test effort Implements complex and redundant routines for tests to leverage Minimizes the impact of a changing application to the tests, which reduces test maintenance

Layers & Design Each layer is developed to promote portability and reusability The more generic a layer, the more reusable it needs to be i.e. the Generic Routines should be able to work for everyone all the time regardless of the environments and AUTs

General Data Flow

Major Components of a Framework Common routines that do not interact with any application Generic UI layer, non-technology-specific manipulation routines Technology-specific layer routines Application-specific layer routines Application-specific Scenario/transactional layer routines Tests layer

Common routines that do not interact with any application Not related to the application or an interface Build more capability and utility that the test tool may not have Functionality that a tester may need for any reason If written properly, these routines will work with test tools that use the same programming language

Generic UI layer routines Some control types, like grids, that are generic and rather independent from the technology that they are written in This is a good place to create additional or alternate logging

Technology-specific layer routines For handling specific technologies – i.e. Browsers, WinForms and WPF. Custom controls will be wrapped with calls that are identical to similar standard controls Create interfaces for new versions of technology if the tool vendor does not yet have the new technology versions integrated

Application-specific layer routines Routines that are specific to the AUT Repository for UI mappings Defines a handler for every individual form/page AUT service interfaces defined and wrapped Serves the calls needed for tests to interact with the AUT

Application-specific Scenario/transactional layer Use this as a distinguishable layer if the routines for scenarios are complex and extensive May include multiple forms/pages In cases where there will not be a lot of routines, this can be combined into the Application-specific manipulation routines

Tests layer This layer will contain only tests No test calls any other test Tests call into the other layers Tests should be very simple as all the complexity is implemented in the other layers

General Data Flow – Strictly Enforce

Standards Using consistent coding standards promoted reusability and maintainability Standards need to be documented and followed similar to what project development would do Use code reviews to enforce standards

Typical Coding Standards Naming conventions for variables and methods/functions Use human readable names! Limit code complexity Separation of layers Comments

Automation Coding Standards Do not use the control type in the name, Address, not AddressEdit No duplication of control names for any specific window if the tools would normally allow this Consistent naming of similar controls form to form, even if the forms label the controls differently

Automation Coding Standards Execute anywhere – tests need to written so that they do not rely upon a very specific environment configuration, unless that is the purpose of the test Unattended testing – tests that need human interaction to execute should be segregated so that the other tests can all be run unattended

Automation Coding Standards No hard coding – use configuration files or similar mechanisms to store information or environment values In tests, avoid using the automation tool syntax Tests should call into the other layers This will make tests less likely to fail if the tool vendor modifies their syntax Can make it easier to port tests to new automation tools

Automation Coding Standards Overuse logging Design for distributed testing and for concurrent execution of tests An automated test will test just a single test No test ever depends upon the successful actions or completion of a previous test Computers don’t care if they do repetitive actions

Standard Routines Baseline (Initialization) Navigation Editing Verification Tools already have their own routines defined for some of this – however, you will get more flexibility and maintainability using these patterns

Baseline Will set the environment to the proper state to start a test This state is defined for each AUT and test team Can be simple to very complex Determined by defining a known state that all tests can reliably execute and get consistent results

Navigation Used to determine if a page/form is active and ready for interaction Will navigate to the desired page/form if the steps required are not complex, or the steps will not alter the outcome of any test Every page/form will have an unique navigation routines created

Editing Enters data into fields, pushes buttons, sets checkboxes, selects values in lists, etc. The control types should not matter when calling this routine – it will figure out what the control type is during test execution and interact with the controls appropriately Defined as an unique routine for every individual page/form

Verification Reads data from all controls types Determines if the values read result in a pass or fail Responsible for logging results Defined as an unique routine for every individual page/form

Areas we did not cover Solution layout Actual code examples Dealing with particularly difficult controls Configuration management Skill sets Specific tools’ capabilities

What we did cover Beginning automated tests Test framework goals Layers of a framework Coding standards Initial routines that every page/form requires

Questions? Thanks for your participation Byron.goodman@neudesic.com