mohan automation strategy

Upload: jacob-gibbs

Post on 02-Jun-2018

223 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/11/2019 Mohan Automation Strategy

    1/13

    Controlled copy

    Automation Strategy

    Prepared By Reviewed by Approved By

    Name

    Role

    Signature

    DateMM/DD/YYYY

    _Automation Project Sign-!!

    Signature

    Name

    Date

    MM/DD/YYYY

  • 8/11/2019 Mohan Automation Strategy

    2/13

    Controlled copy Test Automation Plan

    "able ! #ontent$

    I. Overview ...........................................................................................................................3

    A. Purpose & Scope .......................................................................................................................3

    B. Objective .....................................................................................................................................3

    C. Test Automation Scope .............................................................................................................3

    II. Automation Approach ....................................................................................................4

    A. Data Driven ................................................................................................................................

    B. Script Deve!opment ...................................................................................................................

    C. Automation an" Conventions ...................................................................................................#

    D. Test Automation Stan"ar"s ......................................................................................................#

    $. Automation %atri .....................................................................................................................'

    (. Script %aintenance .....................................................................................................................'

    ). $va!uation o* $rrors an" (ai!ures ...........................................................................................+,

    -. Test Automation $nvironment ................................................................................................+,

    I. Test Data ....................................................................................................................................++

    III. Prob!em eportin/ an" Data ecor"in/ ....................................................................++

    I0. Assumptions1 Depen"encies1 Concerns an" is2s .................................................++

    0. Automation Team o!es an" esponsibi!ities ...........................................................++

    0I. %i!estones an" De!iverab!es ......................................................................................+

    0II. Test Team Trainin/ euirements ............................................................................+

    A. Trainin/ Sche"u!es to o**shore team .....................................................................................+

    0III. e*erences )!ossar5 e*erence ...............................................................................+

    I6. Appen"i A ..................................................................................................................+3

    6. Chan/e 7o/ ..................................................................................................................+3

  • 8/11/2019 Mohan Automation Strategy

    3/13

    Controlled copy Test Automation Plan

    %& verview

    A& Purpo$e ' Scope

    The purpose and scope of the document is to prepare a plan for Testautomation of Project. The scope of this document includesthe following:

    ! Plan for Test "utomation and co#erage

    2) "utomation $hec%list

    &! Plan for 'n#ironment

    B.bjective

    The o(jecti#e of test automation is to automate the following modulespresent in the )*tem +roups

    #& "e$t Automation Scope

    . Test automation en#ironment will (e setup at offshore (0 the offshore1" testing team.

    ,. The offshore 1" testing team will also do test scripting2 #erification and#alidation of results with co3ordination from the onsite testing team.

    &.

  • 8/11/2019 Mohan Automation Strategy

    4/13

    Controlled copy Test Automation Plan

    %%& Automation Approac)

    The automation project will follow Module $entric "pproachas its framewor%. *t willha#e ;euirements Phase2 Module Phase2 Design Phase2 6cript $reation2 6cript ;e#iewand "cceptance testing.

    ;euirements Phase in#ol#es gathering automation test reuirements from the

    manual test cases. This in#ol#es identif0ing test cases for automation and

    prioriti=ing (ased on the needs. The compleit0 factor for each script is alsodefined. The "utomation Project Plan and "utomation ;euest Matriwould (e

    the deli#era(les at the end of this phase.

    Module Phase in#ol#es grouping similar test cases into groups and anal0=ing thefunctions performed in each group. The common functions are written as a singlefunction and can (e used as reusa(le function across scripts. The module flowdiagram and script flow diagram will (e incorporated in the Design document.

    Design Phase in#ol#es creation and re#iew of design document for all "utomation

    tas%s. The deli#era(le for this phase would (e "utomation Design Document.

    6cript creation phase will start once the design re#iew is complete. 6cript$reation will (e done at 5ffshore. This in#ol#es creation of scripts for all modules(ased on the priorities. 1TP . is used for creation of scripts. *f an0 other higher#ersion of this tool is found appropriate it will (e used for automation.

    ?nit testing will (e performed (0 the de#eloper with the 6ample data.

    6cript re#iew will (e done at offshore. The respecti#e leads and "utomation leadsat offshore will perform the re#iew.

    "cceptance testing will (e done (0 the 5nsite leads. The respecti#e leads willperform the acceptance testing (ased on the real time data. Training will (epro#ided to all onsite team once the acceptance testing is completed.

    "ll the test cases identified2 as part of this project will (e translated into automated

    scripts. 6ince re3usa(ilit0 and modularit0 are %e0 points in the automation effort2 weha#e created an automation framewor% called Module $entric "pproach. The maino(jecti#e of this approach is to increase reusa(ilit0 of codes2 reduce redundanc0 incodes2 and eas0 for maintenance.

    The similar functions are written as reusa(le actions and will (e called from the script.@unctions will also (e written to perform alternati#e or negati#e steps to #erif0 negati#eand error conditions in the Test cases. ;ather than retrie#ing the data from within the

    function2 arguments and data will (e passed as parameters in the function call. Ma%ingthe scripts function3centric will impro#e the a(ilit0 of an automation team to reuse the

    code. "ll steps will (e documented in the function for reference. "n0 pre3reuisites forthe function to run successfull0 will (e documented in the design document and in the

    comments in the function header.

    The Datata(le is a feature a#aila(le in Tool that will (e etensi#el0 used in order toautomaticall0 read from a data file and populate screen fields with data during run3time.

    Data dri#en will (e done (0 maintaining a Data file A.ls file!2 which will contain theinput data for the corresponding test case. This 'cel file is di#ided into #arious sections

    and each of these sections pro#ide the num(er of records to (e added into the sectionand the data. The data file name will (e documented in the script for reference.

    There will (e a master scriptAaction! calling all the child scriptsAactions!.

    "ll scripts will ha#e appropriate #erification points. 7erification points for %e0intermediar0 functional results or states in the flow will (e inserted in3(etween steps and

  • 8/11/2019 Mohan Automation Strategy

    5/13

    Controlled copy Test Automation Plan

    at the end of a script to #erif0 the epected results. The #erification points should alsochec% for e#er0 error condition possi(le from the ?*.

    5n test eecution of each test script2 the test log will (e used to #erif0 the results for#erification point passes and for the items that ha#e not passed.

    *ntry #riteria

    5nce the test casesAscenarios! are identified for automation from the manual test cases2

    test criteria are defined2 the application under test is read0 for recording2 and theautomation process could start.

    *+it #riteria

    5nce the acceptance testing for a script is complete and the status for the reuest is

    changed to $losed2 the automation process will stop.

    A& Data Driven

    " data dri#en approach will (e followed in the preparation and eecution of scripts.

    "s mentioned earlier in this document2 all the major @unctional @lows that are going to(e automated using 1TP will ha#e one or more Data ta(les created for the screen inputli%e dates2 names etc. The script can read from and input to screen during run3time.

    The datata(le feature is a#aila(le 1TP2 Test3>6ettings;esourcesDatata(le. The scriptwill read and fetch the datata(le name and the field name respecti#el0 and populate edit

    controls in the screen.

    " sample Datata(leused for searching the *tem group is attached in the appendi forreference.

    B& Script Development

    The automation scripts will (e created in a modular fashion. This means that scripts will(e made re3usa(le. This also means (rea%ing down the functionalit0 into user defined

    functions to ma%e it easier for de(ugging and maintenance. The ta(le (elow is aneample of how a product specific test case script can (e (ro%en down into child and

    parent scripts.

    module contains a(out test cases and in the module phase detailanal0sis would (e done and the test cases would (e modulari=ed (ased on functions .The functions that are distinct to the test cases would (e de#eloped as Parent script andfunctions that are common to most of the test case would (e de#eloped as $hild scripts.

    'ample:

    "e$t AutomationDocument Name

    ,ajor low Name.Parent ScriptName/

    ,ajor !unction$ t)atare occurring moret)an once .#)ild

    Script/

    Script Name$

  • 8/11/2019 Mohan Automation Strategy

    6/13

    Controlled copy Test Automation Plan

    @nTrimfunction

    #& Automation and #onvention$

    De$ign Document

    Design Document will (e prepared for all the scripts as part of the Design phase.*t includes scope of the script2 Purpose2 +roup strateg0 and logic frame2 Moduledescriptions2 pre reuisites2 module flow2 6cript flow2 De#eloper Notes and;eferences.

    a!

    The Design Document Template has to (e followed for all the scripts.

    Script low

    The script flow will (e created for all the scripts for (etter understanding and will(e attached with the design document.

    ,odule low

    The module flow will (e created for all the scripts for (etter understanding andwill (e attached with the design document.

    D& "e$t Automation Standard$

    The 6cripting standards ha#e to (e followed for all the scripts.

    Script ReadabilityThe 6cript written/recorded should (e reada(le and presenta(le. The script

    should (e in such a wa0 that the flow of the script is traced easil0. To achie#e thesegoals we ha#e the following scripting standards

    '#er0 logical step should (e preceded (0 a comment. The $omments shouldfollow the comment standards.

    *ndentations should (e strictl0 followed

    '#er0 script should ha#e a script le#el comment clearl0 mentioning the test casethat is emulated (0 the script2 author2 preconditions2 parameters Aif applica(le!2

    post conditions2 and (rief description. The script header template for thiscomment must (e maintained across all the scripts.

    Script ,odularityModulari=ation of scripts helps in script maintaina(ilit0. The following are the

    standards followed for modulari=ing the scripts.

    'ach2 logicall0 separate2 operations should (e in a user defined Procedures or

    functions or script. These su( scripts can (e called where#er needed.

  • 8/11/2019 Mohan Automation Strategy

    7/13

    Controlled copy Test Automation Plan

    6u(routines can (e of three t0pes (ased on the operation performed (0 that

    su(routine. There are different domains of functionalit0 that eist in theapplication. Depending on that the common su(routines are classified as

    +eneral purpose su(routines2 which are not domain specific2 and are shared(etween the domains

    Domain specific su(routines2 which are specific to that domain2 and are

    used for emulating operations within the (oundar0 of that domain. Thusonl0 the scripts that touch this particular domain will (e reuired to usethese particular su(routines.

    $ommon functions or ?tilities2 these are at a lower la0er of a(straction2 andco#er single/small functionalit0.

    *+ception 0andlingTo maintain a smooth flow of the script one should ensure that all the unepected

    (eha#iors of the application are handled during Pla0(ac% of the +?* script. The standardsfollowed for these are as follows

    "fter e#er0 step2 care should (e ta%en for possi(ilit0 of an0 warning/error

    message popup. "n if3then3else structure should (e used to ensure this. No

    application specific popup should (e treated as unepected acti#e window (0ro(ot.

    'istence of the window should (e #erified (efore an0 operation on that window.6ufficient timeout should (e used.

    Necessar0 #erification point should (e included to chec% whether the step wassuccessful.

    There should not (e an0 possi(ilit0 of infinite loops in the script. Places wheresuch possi(ilit0 eists are loops that simulate waiting for application to respond2li%e waiting for ta( to appear etc. *n an0 scenario2 the script should terminatenaturall02 and should log possi(le reason for failure2 in case the test case fails.

    Beeping a timeout for such loops can ensure this.

    $onsistent naming con#ention in scripting will impro#e reada(ilit0. The steps as to whateach script does and other comments where#er necessar0 will (e gi#en at the (eginningof e#er0 script

    "ll user interaction recordings will (e carried out consistentl0 with the mouse clic% actionand few %e0(oard actions Awhere#er reuired! and identification of menus and com(o(o items should (e (0 name and not (0 *D. The reason recordings will not (e (ased on%e0(oard actions is that there are no hot %e0s a#aila(le for screen le#el controls. Cence

    screen na#igation using %e0(oard will (e a cum(ersome tas%. The recording will (ecarried out in a %nown des%top2 which will (e documented so that the same settings can

    (e duplicated in another machine.

    ormat o! t)e )eaderNote1The Ceader lines should (e commented.

    Test Tool/7ersion :Test Tool 6ettings :;ecorded Erowser/#ersion :@unction "utomated :Preconditions : 8hat must (e set (efore the script runsPost3conditions : The state of the s0stem when the script completes

    Test $ase "utomated :Parameteri=ation Done :

  • 8/11/2019 Mohan Automation Strategy

    8/13

    Controlled copy Test Automation Plan

    "uthor : Testing 6er#ices6cript Name :6cript $reated on :;e#iewed E0 :

    ;e#iew $omment :Modified 5n :

    Modified $omment :

  • 8/11/2019 Mohan Automation Strategy

    9/13

    Controlled copy Test Automation Plan

    *& Automation ,atri+

    The list of "utomation tas%s that ha#e (een identified is mentioned in the (elow

    document "utomation Matri.doc

    & Script ,aintenance

    There is a high maintenance o#erhead for automated test scripts as the0 ha#e to(e continuousl0 %ept up to date2 otherwise 0ou will end up a(andoning hundreds

    of hours wor% (ecause there has (een too man0 changes to an application toma%e modif0ing the test script worthwhile. "s a result2 it is important that thetest scripts are %ept up to date.

    Thus once the scripts are created2 the0 need to (e #ersion controlled for theirchanges. *n8hen 8in;unner is connected to a TestDirector A which is a defect trac%ing/test

    management tool! project with #ersion control support2 one can update andre#ise the automated test scripts while maintaining old #ersions of each test. Thishelps %eep trac% of the changes made to each test script2 see what was modified

    from one #ersion of a script to another2 or return to a pre#ious #ersion of the testscript.

    Cere2 we will discuss how to ha#e #ersion control of the scripts using $M 60nerg02a third part0 #ersion control tool. The process can (e similiar if an0 other tool isused li%e 766 or $76.. The reuester su(mits a change reuest in accordance with the F6cript

    ;euest ProcessG.

    ,. The automation engineers re#iew the change reuest and assign it to an

    appropriate engineer. *n order to determine who (est to address thereuest2 the following items are ta%en into account:

    a. 'ach de#eloper4s a#aila(ilit0

    (. The le#el of effort of the change reuestc. 'ach de#eloper4s familiarit0 with similar reuests

    d. 'ach de#eloper4s familiarit0 with the moduleAs! to which thescript/tool appliese. @or updates to eisting scripts2 each de#eloper4s familiarit0 with thescript4s source language is considered.

    3. The scripter then $hec%s out the latest #ersion of the scripts from $M 60nerg0

    and mar%es the F"utomation ;euestG status in Test as F%n DevelopmentG.

    -. Perform the changes to the script and does a unit test of the same.

    5. *f the unit test passes then change the status of the "utomation reuest in

    Test director to FDevelopment #ompletedG. 'lse continue from 6tep -

    6. "cceptance testing will (e performed (0 the concerned person who raised

    the automation reuest.*f it passes then change the status of the "utomation reuestin Test director to F#lo$edG. *f it fails then start from 6tep -.

    7. *f the status of the automation reuest is closed then change the test case

    status in test director to FBa$elinedG.

    H. The scripter then $hec%s *n all the modified scripts with updated readme

  • 8/11/2019 Mohan Automation Strategy

    10/13

    Controlled copy Test Automation Plan

    document to $M 60nerg0 and ma%e the script read0 for use.

    9. The status of the test case will (e changed to FBa$elinedG if the automation

    of the test case is complete.

    2& *valuation o! *rror$ and ailure$

    6ome of the failure conditions during script eecution ha#e (een ta(ulated for reference.

    6. No 60mptom Pro(lem

    Description

    Possi(le "ction ;emar%s

    . The script stops

    a(ruptl0

    @ailure to find a

    window

    ;e3run the script (0 using

    a (rea%point

    The s0stem

    resources arelow

    ;e3(oot the machine

    @ailure to find afile or director0Aas defined inthe 'cel6preadsheet!

    $orrect the spreadsheetand re3start the script

    Put files in the correctlocation and re3start thescript

    ,. The script runs tocompletion (utthere are $ontet

    sensiti#e errors

    @ailure of a#erificationpoint.

    "nal0=e the failure toconfirm if it is a defectand log the defect in Test

    directorThe #erification Point ma0need to (e o#erwrite as

    the (aseline ma0 ha#echanged. @i the pro(lem

    (0 updating the (aseline.

    Erea% in flow

    due to a failureto identif0 a ?*feature orcontrol in thescreen

    @i the pro(lem (0

    twea%ing script or (0 re3running the script.

    -."e$t Automation *nvironment

    Iicensed to (e installed on 5ffshore 1" machine with at least ,H ME ;"M and

    at least +E hard dis% space should (e a#aila(le.

    ?ser ids will (e setup (0 the administrator to login and wor% on the repositor0 from the1" machine.

    Test en#ironment to eecute the scripts has to (e performed as per the notes a#aila(lein the design document of e#er0 script.

    ;ecording and 'ecution of the script will (e done as mentioned (elow

  • 8/11/2019 Mohan Automation Strategy

    11/13

    Controlled copy Test Automation Plan

    Tool Tool 7ersion 5perating60stem

    8indows9P/NT/,

    I. "e$t Data

    Test data will (e ta%en from the data(ase.

    The onsite team will pro#ide test data on reuest.

    The offshore team will prepare Datata(le (ased on the test data for automation

    needs.

    III. Problem Reporting and Data Recording

    The ;esults of the script eecution of the "pplication test

    cases will (e reported in the log files of the tool used for automation.

    The ;esults of the script eecution of the component cases will (ereported as defect files.

    %(&A$$umption$3 Dependencie$3 #oncern$ and Ri$4$

    The tool with wor%ing licenses should (e a#aila(le for the en#ironment to (eset up and scripts to (e run.

    5nsite team leads ha#e to inform the offshore team a(out the changes in the

    test cases and test data and +?* la0outs.

    5ffshore Testing team has to update the datata(le if there is an0 change in

    the test data.

    (& Automation "eam Role$ and Re$pon$ibilitie$

    ;ole ;esponsi(ilities Name

    5nsite Iead ;e#iews Design Document2 6cript andacceptance testing

    5nsite$oordinator

    ;e#iew and coordination.

    5ffshore

    $oordinator

    ;e#iew and coordination.

    5ffshore Team

    mem(er

    De#elops Design Document2 De#elops 6cript2

    6cript modification2 acceptance testing

  • 8/11/2019 Mohan Automation Strategy

    12/13

    Controlled copy Test Automation Plan

    (%&,ile$tone$ and Deliverable$

    Milestone Tas% 6tart Date 'nd Date 'stimated'ffortA *nPerson

    Da0s!

    Deli#era(les

    "utomation Project Plan Project Plan "ppro#al

    ;euirements

    Design Document

    $reation

    "utomation design

    document.

    6cript $reation 6cripts

    6cript ;e#iew "ppro#ed 6cripts

    "cceptance Testing @inal 6ignoff

    "utomation ;eport"utomation ;esult

    6ummar0

    (%%& "e$t "eam "raining Re5uirement$

    Training;euirement Training "pproach

    Target Datefor$ompletion

    ;oles/;esourcesto (e Trained

    Trainers

    6cript

    'ecution andDatata(lemodification

    on Tools

    Training will (e

    conducted afteracceptance testing.

    5nsite Team

    Tool "d#anced6cripting

    Training will (econducted on need

    (asis

    5ffshore team Testing6er#ices

    "utomationteam

    A& "raining Sc)edule$ to o!!$)ore team

    Product Training Description Target date

    of$ompletion

    ;esources

    to (etrained

    Trainers

    0III. Re!erence$ 2lo$$ary Re!erence

    "erm De!inition Pertain$ to1

    TD Test Director Test Management Tool"P6 "hold Pricing 60stem "pplication

    ;E;; ;ules Eased ;ecommended ;etails "pplication1TP 1uic% Test Professional 1TP .+?* +raphical ?ser *nterface 5(jects in a screen56 5perating 60stem

  • 8/11/2019 Mohan Automation Strategy

    13/13

    Controlled copy Test Automation Plan

    ?* ?ser *nterface

    %6&Appendi+ A

    Automation #)ec4 7i$t

    6& #)ange 7og

    Please note that this ta(le needs to (e maintained e#en if a $onfigurationManagement tool is used.

    (er$ionNumber

    #)ange$ made

    7. Initial Draft