innovative test automation solution

33
High Reuse, Low Maintenance: A Practical Approach to Test Automation Alan White The Nielsen Company [email protected]

Upload: alan-white

Post on 01-Nov-2014

431 views

Category:

Technology


0 download

DESCRIPTION

Test automation efforts often result in failure or lack of long term commitment due to complexity and costs associated with maintaining test scripts. When testers find it difficult to construct, execute, or update scripts, expectations of management are not realized, resullting in project termination. We avoided test automation failure by utilizing an innovative framework which reduces maintenance burdens associated with test scripts while increases user productivity.

TRANSCRIPT

Page 1: Innovative Test Automation Solution

High Reuse, Low Maintenance:A Practical Approach to Test Automation

Alan White

The Nielsen [email protected]

Page 2: Innovative Test Automation Solution

Learning Objectives; You will…

• understand the concepts behind one of the more successful test automation frameworks to date,

• find out which widely used product can be used to quickly produce a visually cohesive, wizard-based GUI tool for creating repeatable test cases, and

• learn how to quickly and intuitively generate and store automated test cases with relative ease while reducing errors – no programming needed!

Page 3: Innovative Test Automation Solution

Problems with Traditional Automation

• Maintenance Intensive• Fragile in Nature• Programming Experience Needed• Static Data• Tightly Coupled to AUT• Minimal Reuse Capability• Unnoticeable Productivity Gains

Page 4: Innovative Test Automation Solution

Solution

• Intuitive• Structured• Maintainable• Role Based• Dynamic Data• Reusable Components

Page 5: Innovative Test Automation Solution

Goals

• Loose Coupling– Application Under Test– Test Automation Tools– Development Platform

• Self Documenting Test Automation Scripts– Scripts look like manual scripts– Detailed account of AUT interactions

• Abstract Complexity from User Community– No programming knowledge required– Focus on building Test Assets

Page 6: Innovative Test Automation Solution

Framework Overview

• GUI Maps– Screens & Components– Controls & Actions

• Test Assets– Test Steps– Test Cases– Test Suites

• AUT Invocation Code (Engine)– Main Loop– Function Libraries (for AUT platform)

Page 7: Innovative Test Automation Solution

Role Based Framework

• Test Engineer (Programmer)– GUI Maps

– AUT Invocation Code

• User Community (SQA, UAT, BA)– Test Script Maintenance

– Test Execution and Results Analysis

• Test Asset Librarian– Naming Conventions

– Other Standards

Page 8: Innovative Test Automation Solution

GUI Maps

• Translate the technical names of screens and components to more meaningful names

Page 9: Innovative Test Automation Solution

Test Steps

• Are the building blocks for Test Cases • Link components to screens and actions to controls• Interact with the AUT to perform specific functions• Should be broken down by their function:

– Navigation– Changing Data– Verifying Data

• Are Highly Reusable Test Assets!

Page 10: Innovative Test Automation Solution

Test Step Example

• Screens and Components are derived from the GUI map• Controls and Actions are mapped to Screens and Components• Parameters store default values that may be overridden

Page 11: Innovative Test Automation Solution

Test Cases

• Are sequential lists of Test Steps that perform specific test operations beginning and ending at the AUT central point

• Allow for overriding existing values to parameters declared in Test Steps

• Resemble manual test cases & narratives

Page 12: Innovative Test Automation Solution

Test Case Example

Page 13: Innovative Test Automation Solution

Test Suites

• Are the highest level of abstraction that specify which test cases are to be executed in the order they should be executed

• Different test suites are defined to operate on different modules or components of an application

Page 14: Innovative Test Automation Solution

Test Suite Example

Page 15: Innovative Test Automation Solution

Hierarchy of Assets

Page 16: Innovative Test Automation Solution

AUT Invocation Code

• Can be developed using commercial test automation tools such as Rational Robot and Mercury QTP or open source tools like WATIR

• Uses Simple Decision Structures• Portable/Maintainable/Reusable• Versatile – Can interact with the AUT screen and

components in the following ways:– Input or Select Values – Verify Values and Properties– Verify Existence

Page 17: Innovative Test Automation Solution

Main Loop• Loops through each instruction (data row)

– Each instruction has its own control

• Branches each control for processing• Reports status to the log

Page 18: Innovative Test Automation Solution

Function Libraries• Contain the functions created for each control• Branch actions in each control function• Can be reused by other applications

Page 19: Innovative Test Automation Solution

Putting the pieces together

Main Loop Control Library

Test Steps/Cases

Test Execution Log

1

23

4

AUT

Page 20: Innovative Test Automation Solution

Microsoft Access Works Well for Building the Front End, Test Asset Creation Tool!

• VBA and SQL• Tables/Queries• Forms/Reports• Data Pages• Macros• Code Modules• Security

Note: More Advanced Deployments might consider developing in an enterprise SDK (e.g. VB, C#, Java).

Page 21: Innovative Test Automation Solution

Getting Started!

Page 22: Innovative Test Automation Solution

How to GUI Map

Page 23: Innovative Test Automation Solution

How to Create a Test Step

Page 24: Innovative Test Automation Solution

How to Create a Test Case

Page 25: Innovative Test Automation Solution

How to Create a Test Case

Page 26: Innovative Test Automation Solution

How to Create a Test Suite

Page 27: Innovative Test Automation Solution
Page 28: Innovative Test Automation Solution

Costs

• Build the Test Asset Creation Tool• GUI Map the Applications Under Test• Build the AUT Invocation Code (Engine)• Train the User Community

Page 29: Innovative Test Automation Solution

Benefits

• Reduced and Known Test Execution Time• Greater Test Coverage• Long Term Cost Savings• Can Run Scheduled and Unattended• Lower Maintenance Effort• Quicker Response to Application Changes

Page 30: Innovative Test Automation Solution

Deployments

• Application Under Test Platforms– PowerBuilder– Java– HTML

• User Communities– Development– SQA– UAT

• Types of Testing– Unit– Smoke– Regression– User Acceptance

Page 31: Innovative Test Automation Solution

Division of Effort

• Dedicated Test Engineer– Ideally 100% Effort Initially– Construction of Framework (Engine)– Construction of Test Asset Creation Tool– Build and Maintain the GUI Maps

• User Community– Create and Maintain Test Scripts– Analyze Test Execution Results– Communicate AUT Changes

Page 32: Innovative Test Automation Solution

Questions

• Please feel free to ask your questions or make comments.

• Thank You!

Page 33: Innovative Test Automation Solution

Further Reading• Nagle, C. “Test Automation Frameworks” White Paper

http://safsdev.sourceforge.net/FRAMESDataDrivenTestAutomationFrameworks.htm

• Hayes, L. “Implementing a Test Automation Framework” Tutorial presented at STAR EAST 2005 Conference, Orlando, FL, May 16, 2005.

• Automated Testing Specialists, Methodologies for Automated Testinghttp://www.sqa-test.com/method.html

• Zambelich, K. Totally Data-Driven Automated Testing 1998http://www.sqa-test.com/w_paper1.html

• LogiGear Whitepaper Series, Achieving the Full Potential of Test Automation October 25, 2004

• Mosley, D. & Posey, B. Just Enough Software Test Automation New Jersey: Prentice Hall PTR, 2002.

• Buwalda, H. & Janssen D. Integrated Test Design and Automation Great Britain: Addison-Wesley, 2002