PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test...

57
PREDICT Model for Test Automation

Transcript of PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test...

Page 1: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

PREDICT Model for Test Automation

Page 2: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Does it sound familiar to you?Does it sound familiar to you?

• Organization has procured test automation tools

• Management expectations are high

• Multiple test automation project initiatives started

• Enthusiasm, commitment and motivation declined with

time

• Script maintenance had become a significant challenge

• Test automation tools are back on shelf

Page 3: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

• Testing and test automation requires same skills

• Capture/Replay is a successful test automation approach

• Test automation is an integral part of the over all test process

• Test automation is effective in solving regression testing issues

• Every test and test type can be automated

• Test automation development is software development

• Test automation projects can be delivered by personnel with strong

project management skills

Spot QuizSpot Quiz

Page 4: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Essential building blocks for successful test automation solutions

Test automation solution approachTest automation solution approach

Page 5: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

PREDICT ModelPREDICT Model

RationalizeRationalize

TransitionTransition EstimateEstimate

DesignDesign

ImplementImplement

ConsolidateConsolidate

PlanPlan

Page 6: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

PREDICT ModelPREDICT Model

• Structured methodology• Multi stage process consisting of seven components

• Plan• Rationalize• Estimate• Design• Implement• Consolidate• Transition

• Step-wise approach• Easy to apply

Page 7: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

PREDICT Model - PlanPREDICT Model - Plan

RationalizeRationalize

TransitionTransition

PlanPlan

EstimateEstimate

DesignDesign

ImplementImplement

ConsolidateConsolidate

Page 8: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Need for test automation projectNeed for test automation project

• What do you consider to start a project ?• Test related checks

• Objective• Scope• Documentation• Test ware

• Organization related checks• Investments• Expectations• Resource availability

• Technology related checks• Stability of SUT• Test tool suitability

Page 9: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Need for test automation projectNeed for test automation project

• Are you getting bang for your buck ?• Costs

• Licensing• Framework• Implementation• Maintenance factor

• Benefits• Saved manual effort per test run• Number of test runs• Re-usability factor

• Amortizing benefits• Life cycle of the application/product• Opportunities for test automation

Page 10: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Plan of approachPlan of approach

• Introduction• Objective• Pre-requisites• Set-up pilot project• Activities• Planning• Deliverables• Organization• Resources

Page 11: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

PREDICT Model - RationalizePREDICT Model - Rationalize

RationalizeRationalize

TransitionTransition

PlanPlan

EstimateEstimate

DesignDesign

ImplementImplement

ConsolidateConsolidate

Page 12: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

How do we rationalize requirements ?How do we rationalize requirements ?

• 5 P factors

– Project

– Process

– Product

– People

– Price

• Test suite attributes

• Building trade-offs based on project context

Page 13: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

ProjectProject

• Objective and scope• Clear objectives in terms of time, money and quality

• Strategy• Test automation strategy fitment with manual testing strategy

• Build• Build frequency

• Configuration management• Bad experiences

• User interface• Stability

• Cycle time• Regression possible

Page 14: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

ProcessProcess

• Quality documentation• Manual test scripts, documentation

• Development approach• Phases clearly defined, how early can test automation

start

• Test practice• New builds tested before delivering to QA• Regression moments

• Naming conventions• User Interface conventions

Page 15: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

ProductProduct

• Stability• Base platform stability

• Testability• Degree of interaction between the tool and product

under test

• Test tool integration• Integration between test management tool and

configuration management

• Test oracles• Interaction with non UI components,database

• Automation framework• Availability of frame work to reuse

Page 16: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

PeoplePeople

• Organization readiness• Management expectations

• Resource availability• Machine, Licenses and people with right skills

• Non- programming resources• Framework inclined towards non-programming resources

• QA population• Ratio of development to QA

• Collaboration• Collaboration between QA and Dev

• Technical skill set• Test engineers with technical skills

Page 17: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

PricePrice

• Return on Investment• Opportunities of reusing test automation investment

• Reusability of Investment• Are there any products which are tested in a similar

way

• Business Plan• Is there a business plan to realize benefits of Test

Automation

Page 18: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Test suite attributesTest suite attributes

• Maintainability• Reusability• Reliability• Usability• Portability

Page 19: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Which is best test automation regime ?Which is best test automation regime ?

IT DEPENDS ON THE PROJECT CONTEXT

Page 20: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

PREDICT Model - EstimatePREDICT Model - Estimate

RationalizeRationalize

TransitionTransition

PlanPlan

EstimateEstimate

DesignDesign

ImplementImplement

ConsolidateConsolidate

Page 21: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Test automation estimation challengesTest automation estimation challenges

• Test organization maturity• Scope of requirements• Framework• Skill level• Test case complexity• Domain complexity• Test tool• Testability

Page 22: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Estimation techniquesEstimation techniques

• Delphi• Gather estimates from each team member• Ask high and low estimator to explain estimates• Repeat twice, then use average

• Three point method• Have team estimate best, worst case and expected case• Use expected case• Variances between best and worst useful to gauge

estimate accuracy

Page 23: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Work Break down StructureWork Break down Structure

Page 24: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Risk categoriesRisk categories

• Technical• Test tool• Application/product• Communication

Page 25: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Risk managementRisk management

Page 26: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

PREDICT Model - DesignPREDICT Model - Design

RationalizeRationalize

TransitionTransition

PlanPlan

EstimateEstimate

DesignDesign

ImplementImplement

ConsolidateConsolidate

Page 27: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Test suite design issuesTest suite design issues

• Testability• Test suite design patterns

Page 28: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Testability considerationsTestability considerations

• Tools• Design• Naming Conventions• Exception & Error Handling• Timing issues• Logging• Visual Cue• Processes & Documentation

Page 29: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

• Record/Play back

• Functional de-composition

• Key-word Driven

• User Interface-driven

• Model-based

Test automation development approachesTest automation development approaches

Page 30: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

• Advantages

• Useful in determining how the tool interacts with the application under test

• Provides initial ideas on how to develop test scripts

• Useful while ‘Playing around’ with the tool

• Disadvantages• Test scripts contains hard-coded values

• Un-reliable scripts : Any small change in the application results in not being able to replay

• Maintenance costs are astronomical

• Not viable & cost-effective

Record & PlaybackRecord & Playback

Page 31: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

• Reduces test scripts into their fundamental tasks• Driver Scripts : Initialization, Calling scripts in a desired

order • Generic scripts : General,Application

specific,Navigation,Data verification,Reporting,logging etc…

• Business Function Scripts : ‘Re-usable’ Business functionality,Makes calls to Generic Scripts

• Test Script : Test Logic, Makes calls to Business Function Scripts and Generic Scripts

• Test data and logic are separated• Hierarchical structure is employed :

Modular design• Each test script unique data file

Functional decompositionFunctional decomposition

Page 32: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Test Director

Reports

Test Scripts

Generic Library BusinessLibrary

Test Scripts

EnvironmentConfiguration

Stored Proc ObjectRepository

Technical ArchitectureTechnical Architecture

Page 33: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Functional decomposition: AnalysisFunctional decomposition: Analysis

• Advantages• Modular design : Reduces redundancy and duplication of

efforts • Test data input & output stored in a single data file : Easy

maintenance• Scripts can be developed whilst application development is

in progress : Generic Scripts• Single point maintenance is possible using Business

Function scripts• Scripts can return TRUE (or) FALSE to the calling scripts.

This makes it easy for ‘Error Recovery’ & un-attended test execution

• Assemble tests on demand

• Disadvantages• Proficiency in the TSL• Complex test data file management

Page 34: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

• The test script is represented as a set of key-words in a spread sheet• Examples of Key-words are start_test, Initial

window,Url,Input,Verify etc..

• Driver Script Performs the initialization as required • Driver Script Reads and processes the file name(s)

of the test scripts• Driver Script Matches the ‘Key Words’ contained in

the file• Driver Script invokes Business Function & Generic scripts• Report the return values back• The entire process is data-driven

Key-word drivenKey-word driven

Page 35: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

• Advantages• Preserves most of the advantages of the ‘Functional

decomposition’ method• Very similar to documenting manual test script• Minimal programming knowledge is required to write and

execute test scripts• Return on investment can be achieved quicker than other

methods in most of the cases• Re-usability significantly increases over a period of time• Test script development is possible with out a functioning

application

• Disadvantages• Investment in initial frame work• Training might become tedious

Key-word driven - AnalysisKey-word driven - Analysis

Page 36: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

GenericScripts

Keyword Driven Test Cluster

Business FunctionScript4

Reports

Driver Script

Business FunctionScript1

Business FunctionScript2

Business FunctionScript3

GUI Map

Technical ArchitectureTechnical Architecture

Page 37: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

• Abstraction of test structure: Test set Test case Test step Test action

• Key-words are identified based on the application under test

• Test steps are created using user interface• Test set management (Creation/execution)

Test set

Test case

Test step

Test action

User interface drivenUser interface driven

Page 38: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Automation Framework

RecordingEngine

Script Generation

Module

APPLICATION

User Interface

Test

Test Script

XML Object Repository

Object Creation Module

Execution Engine

Win Runner/QT

P/Silk Test/…

Library Structure

Technical ArchitectureTechnical Architecture

Page 39: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

• Advantages• Preserves most of the advantages of the previous

methods• Insulates tests both from the changes of the application

and failings of test automation tools• Zero-programming required• Return-on-investment is very high• Re-usability significantly increases over a period of time• Robustness and maintainability is high• Partly application independent• Minimal learning curve

• Challenges• High initial investment in creating framework• Functioning application needed

User interface, Model driven - AnalysisUser interface, Model driven - Analysis

Page 40: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Test Case Generator(In key words)

Keyword Translator engine(Test tool specific)

Automated Test Scripts

Test drivergenerator

Behavior modeler

Requirements (UML)

Win Runne

r

Win Runne

r

Silk Test

Silk Test

Other test tools

Other test tools

Model DrivenModel Driven

Page 41: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

PREDICT Model - ImplementPREDICT Model - Implement

RationalizeRationalize

TransitionTransition

PlanPlan

EstimateEstimate

DesignDesign

ImplementImplement

ConsolidateConsolidate

Page 42: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Test automation implementation issuesTest automation implementation issues

• Team structure• Work allocation• Coding guide-lines and check lists• Peer reviews• Test runs• Integration• Configuration management

Page 43: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Work allocationWork allocation

Page 44: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Coding guidelines and checklistCoding guidelines and checklist

Page 45: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

ReviewsReviews

Page 46: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Building integrationsBuilding integrations

Test Script1

Test Script2

Test Script3

Call Test Script1()Call Test Script2()Call Test Script3()

Page 47: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Configuration management : VSSConfiguration management : VSS

Page 48: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Test executionTest execution

• Test suite execution check-lists are used• Test Execution

• A separate test environment is prepared • Fresh test data in test DB• Fresh test data in Application DB

• Tests are executed • Test suite execution issues & root cause

analysis is documented• Report Test Results• Update test scripts if needed

Page 49: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Test execution logTest execution log

Page 50: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

PREDICT Model - ConsolidatePREDICT Model - Consolidate

RationalizeRationalize

TransitionTransition

PlanPlan

EstimateEstimate

DesignDesign

ImplementImplement

ConsolidateConsolidate

Page 51: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

• Update scripts and test data• Complete documentation (User Manual, installation

Guide and maintenance guide)• Freeze & archive test suite• Professionally packaged shippable test suite• Easy distribution mechanism

Activities in consolidationActivities in consolidation

Page 52: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

User manualUser manual

Page 53: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

Professional packagingProfessional packaging

Page 54: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

PREDICT Model - TransitionPREDICT Model - Transition

RationalizeRationalize

TransitionTransition

PlanPlan

EstimateEstimate

DesignDesign

ImplementImplement

ConsolidateConsolidate

Page 55: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

• Acceptance test runs performed• Knowledge transfer to the user groups• Gain feedback from the field• Prepare for maintenance and sustenance• Up-gradation plans• Discussion for next project

Transition processTransition process

Page 56: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.

• Successful test automation projects require mature test automation leadership skills

• Test automation projects should be treated like a development project

• Understanding PREDICT Model• Challenges, issues, tips and tricks in applying

PREDICT model

Wrap upWrap up

Page 57: PREDICT Model for Test Automation. Does it sound familiar to you? Organization has procured test automation tools Management expectations are high Multiple.