art automation standards document v0.1

Upload: haitochaitu

Post on 02-Jun-2018

231 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/11/2019 ART Automation Standards Document v0.1

    1/17

    EVO ART Company Restricted

    EVO ART

    Automation StandardsExecutive Summary

    With the inception of Automated Regression Testing (ART) team, EVO Programme hasintroduced automation into their testing arena with an oera!! goa! to hae an improed andmore effectie regression testing capa"i!ity within EVO#

    This document out!ines how ART imp!ements framewor$ "ased automated functiona! testingso!ution, and the dee!opment standards that wi!! "e adhered to, to ensure the creation of ro"ustand managea"!e automated test scenarios#

    The intended audience for this document are ART team mem"ers% &nterna! customers andsta$eho!ders' EVO Programme &T teams mem"ers, anagers, ponsors, etc% And*or anye+terna! partners ino!ed with EVO Programme in de!iery or continuous improementinitiaties#

    ate of &ssue- ./*0/*10./ Page . of .2

    ocument Tit!e- Automation tandards

    http://www.vodafone.com/
  • 8/11/2019 ART Automation Standards Document v0.1

    2/17

    EVO ART Company Restricted

    Table of Contents

    1 Introduction to Automation.............................................................................................

    2 Automation Toolset..........................................................................................................

    1#. 3uic$Test Professiona!###########################################################################################################1#1 3ua!ity Center#########################################################################################################################

    Automation !rame"or#...................................................................................................

    $ %evelo&ment Standards..................................................................................................

    4#. 5i!e torage############################################################################################################################4#.#. 5ramewor$ Components###############################################################################################4#.#1 Automated cripts#########################################################################################################

    4#1 6aming Conentions##############################################################################################################4#1#. cript 6aming###############################################################################################################4#1#1 O"7ect 6aming##############################################################################################################

    4#/ cripting tandards################################################################################################################4#/#. 5unction 8eaders##########################################################################################################4#/#1 anua! Test Temp!ates#################################################################################################4#/#/ Varia"!e ec!aration######################################################################################################4#/#/#. 9oca!#########################################################################################################################4#/#/#1 :!o"a!#######################################################################################################################

    4#/#4 5!ow Contro!##################################################################################################################4#/#4#. &f ; E!se#####################################################################################################################4#/#4#1 5or 9oop####################################################################################################################4#/#4#/ Whi!e 9oop##############################################################################################################4#/#4#4 o 9oop##################################################################################################################4#/#4#< e!ect Case#############################################################################################################

    4#4 =ac$up and Restore#############################################################################################################4#< Reiew tandards#################################################################################################################

    4#

  • 8/11/2019 ART Automation Standards Document v0.1

    3/17

    EVO ART Company Restricted

    1 Introduction to Automation5or imp!ementation of successfu! automation so!utions the fo!!owing fie $ey aspects of goodtest script design shou!d "e adhered to-

    aintainability/ Test cript maintenance is ineita"!e and needs to "e p!anned for inadance# esigning scripts with maintaina"i!ity in mind, using agreed coding standards andmodu!ar, common function !i"raries ena"!es efficient maintaina"i!ity#

    Inte-rity/When an automated test reports that a test passed, we need to demonstrate this isindeed the case, and not 7ust that the test >didn?t fai!@ due to e#g# not testing a particu!arfunction of the app!ication#

    Inde&endence/Automated tests must "e designed to run unaided# To do this effectie!y, thescript must "e resi!ient i#e# hae in'"ui!t recoery capa"i!ities and "e a"!e to dea! with andrecoer itse!f from a fai!ure state#

    Re&eatability- &t is ita! that the tests e+ecute in the same way eery time they are run# Thismay reuire the inc!usion of data or enironment set'up * restore modu!es in the test suite#

    Revie"ability/&t is ita! that it is easy to determine what the test script is trying to achiee#=eing a"!e to easi!y reiew your test suite a!so faci!itates peer reiew#

    &ncorporating these design considerations wi!! he!p ensure that the automated test suite wi!!continue to "e usa"!e for the !ife of the product it tests#

    The fo!!owing sections of this document wi!! detai! how test suites can "e created andmaintained "y fo!!owing the fie $ey aspects a"oe#

    ate of &ssue- ./*0/*10./ Page / of .2

    ocument Tit!e- Automation tandards

    http://www.vodafone.com/
  • 8/11/2019 ART Automation Standards Document v0.1

    4/17

    EVO ART Company Restricted

    2 Automation Toolset

    2.1 0uic#Test rofessional3uic$ Test Professiona! (3TP) is an automated functiona! :raphica! Bser &nterface (:B&)testing too! that a!!ows the automation of user actions on a we" or c!ient "ased computerapp!ication# &t is primari!y used for functiona! regression test automation# 3TP uses a scripting!anguage "ui!t on top of V=cript to specify the test procedure, and to manipu!ate the o"7ectsand contro!s of the app!ication under test (ABT)#

    ou wi!! see the manua! steps hae "een added as comments, and code to report each stepis "eing e+ecuted has "een added#

    2.2 0uality Center

    8P 3ua!ity Center (3C) integrates and automates test management with functiona! testingactiities# 3ua!ity Center ena"!es you to share and reuse testing e+pertise across the ua!ity!ife cyc!e# &t proides a customiDa"!e wor$f!ow that easi!y adapts and e+tends to meet ourspecific ua!ity process needs#anua! test scripts are first prepared "ased on the input from the functiona! team mem"ers,adhering to agreed standards (see section 4)# 5rom here, the test cases wi!! "e pic$ed up andautomated# This is discussed in detai! in the >Test Automation 5ramewor$@ !ater in thisdocument#

    ate of &ssue- ./*0/*10./ Page 4 of .2

    ocument Tit!e- Automation tandards

    http://www.vodafone.com/
  • 8/11/2019 ART Automation Standards Document v0.1

    5/17

    EVO ART Company Restricted

    Automation !rame"or#

    Refer to 5ramewor$ esign ocument

    ART AutomationFramework Design Do

    ate of &ssue- ./*0/*10./ Page < of .2

    ocument Tit!e- Automation tandards

    http://www.vodafone.com/
  • 8/11/2019 ART Automation Standards Document v0.1

    6/17

    EVO ART Company Restricted

    $ %evelo&ment Standards

    $.1 !ile Stora-e

    $.1.1 !rame"or# Com&onents

    Within the current ersion of 3ua!ity Centre .0#00, framewor$ resources name!y shared o"7ectrepository, function !i"raries, enironment aria"!e are stored in the Test Resources modu!ewithin the fo!der structure as suggested "y the screen shot "e!ow-

    $.1.2 Automated Scri&ts

    ue to the nature of test script creation (i#e# created from manua! test case) the actua! testscript !ocation within 3C wi!! "e dictated "y the test ana!ysts# &t is ita!!y important that thesetest cases are stored in the correct p!ace, fo!!owing an intuitie naming conention# These arein p!ace a!ready, which in turn wou!d a!!ow a ery stream!ined and ua!itatie dee!opment ofthe Automated Regression uite# A!! the test scripts are stored within 3ua!ity Centre >TestP!an@ modu!e in the pre'defined fo!der structures with agreed naming conentions as "e!ow-

    ate of &ssue- ./*0/*10./ Page of .2

    ocument Tit!e- Automation tandards

    http://www.vodafone.com/
  • 8/11/2019 ART Automation Standards Document v0.1

    7/17

    EVO ART Company Restricted

    $.2 amin- Conventions

    A strict naming conention has "een designed and adhered to a!! the ART components due tothe dierse and comp!e+ nature of app!ication(s) under test, name!y R, AP ECC,&nterfaces, We" etc# This he!ps to ensure consistency, identification and differentiation fromother simi!ar resources, maintaina"i!ity and easy to understand#

    $.2.1 Scri&t amin-EVO ART cripts coer the fo!!owing app!ications-

    a) R (We" app!ication)") AP CR :B& (AP :B& app!ication)c) AP ECC :B& (AP :B& app!ication)d) &nterfaces (We" app!ication)e) E'mai! (windows app!ication)

    ue to the dierse nature of the app!ication and their p!atforms, a naming conention as"e!ow has "een used to distinct!y identify them from each other-

    A&&lication 3nder Test Scri&t amin- Convention

    R (We" app!ication) APFPORTA9FG

    AP CR :B& (AP :B& app!ication) APFCRFGAP ECC :B& (AP :B& app!ication) APFECCFG

    &nterfaces EVOF&nterfaceF

    E'mai! (windows app!ication) GG 8and!ed within the function

    e#g# >SAP_ECC_Create_Purchase_Order_ME21N(6ote- ' G hort description of the scripts and* or T'code)

    ate of &ssue- ./*0/*10./ Page 2 of .2

    ocument Tit!e- Automation tandards

    http://www.vodafone.com/
  • 8/11/2019 ART Automation Standards Document v0.1

    8/17

    EVO ART Company Restricted

    $.2.2 Ob4ect amin-

    imi!ar to the naming conention for the scripts, a naming conention the O"7ect Repositoriesand their chi!d o"7ects has a!so "een fo!!owed as "e!ow-

    A&&lication 3nder Test Ob4ect Re&ository amin- Convention

    R (We" app!ication) APFEVOFR#tsr

    AP ECC (AP :B& app!ication) APFEVOFECC#tsr

    AP CR (AP :B& app!ication) APFEVOFCR#tsr

    E'mai! (windows app!ication) 6*A

    5urther the o"7ects within these repositories a!so fo!!ow a strict naming conention e#g-(6ote- These are e+amp!es for on!y a few O"7ect C!asses)

    Ob4ect Class Ob4ect amin- Convention

    AP :B& Window APFGAP :B& =utton :B&"tnG

    AP :B& Edit :B&edtG

    WE= Edit We"edtG

    WE= 9in$ We"!n$G

    WE= E!ement We"e!mG

    e#g#SAP_CRM Easy Access, GUIbtn_Enter, GUIedt_C!ent

    $. Scri&tin- Standards

    An agreed set of scripting standards in !ine with mar$et "est practices is fo!!owed for a!! theAutomation scripts de!iered for EVO# These scripting standards are detai!ed as "e!ow-

    $..1 !unction *eaders

    Each function defined (in 5unctiona! 9i"rary or in test scripts) shou!d hae a header thatinc!udes the fo!!owing information

    ate of &ssue- ./*0/*10./ Page H of .2

    ocument Tit!e- Automation tandards

    http://www.vodafone.com/
  • 8/11/2019 ART Automation Standards Document v0.1

    9/17

    EVO ART Company Restricted

    Attri"ute escription

    6ame The name of the function inc!uding the scope (i#e# Pu"!ic or Priate)

    escription A escription of the function

    Parameters A !ist of parameters inc!uding the name, direction (=yVa! or =yRef) and adescription of the parameter

    Return Va!ue The !ist of possi"!e return a!ues and their meaningAuthor This contains the Author name

    9ast Change ate This fie!d has the !ast change date

    9ast Changed "y This fie!d the name of person !ast changing the function

    A suggested header format is gien as an appendi+ to this document (Appendi+ 1)

    $..2 anual Test Tem&lates

    Each manua! script has three sections to c!ear!y identify the script steps, name!ya) tep 6ame ; This is the seuence of steps to "e performed for a particu!ar T'code or

    Bser Action e#g# tep ., tep 1

    ") escription ; This is a short description of the action to "e performed on theapp!ication either a user input or action

    c) E+pected Resu!t ; This section contains the e+pected resu!t at the end of each useraction* step

    $.. Variable %eclaration

    ost of the automated scripts hae aria"!es and a!! of them are dec!ared "efore the aria"!einitia!isation#

    $...1 )ocal

    Varia"!e which are used on!y within an action* script are dec!ared within the indiidua! scriptsand not aai!a"!e at a g!o"a! !ee!#

    They are dec!ared 7ust "efore the aria"!e initia!iDation "y the >Dim@ statement and aria"!esseparated "y comma#

    $...2 5lobal

    :!o"a! aria"!es are used at the function !ee! in EVO and are dec!ared within the functions#These aria"!es are aai!a"!e to a!! the scripts* actions where the respectie functions areca!!ed#

    $..$ !lo" Control

    tandard V=cript functions and $eywords are used to maintain a contro! within the scripts,proide conditiona! statements, !oops etc# ome of these are descri"ed "e!ow-

    $..$.1 If ( ElseThis is a conditiona! statement used, when there a!ternate possi"!e outcomes of a particu!arstep and a different step needs to "e performed in each case#e#g#

    IfConditionT6enStatement1ElseStatement2End if&!!ustratie e+amp!e from the 3TP scripts is as "e!ow-

    ate of &ssue- ./*0/*10./ Page I of .2

    ocument Tit!e- Automation tandards

    http://www.vodafone.com/
  • 8/11/2019 ART Automation Standards Document v0.1

    10/17

    EVO ART Company Restricted

    If objConn.State = 0 ThenReporter.ReportEvent micFail !InitD"# $nable to e%tabli%h connection to ! & D"'ameE(itTe%tInitD" = Fal%e

    End If

    $..$.2 !or )oo&

    This statement is used to run a particu!ar !ine of code > n) num"er of times irrespectie of theoutcome# &t can "e modified to e+it the !oop if a particu!ar condition has "een achieed#e#g#

    !ori = 1 To *Statementext

    &!!ustratie e+amp!e from the 3TP scripts is as "e!ow-

    For additionalSheet% =+ to "itmap,Co-ntE(l"oo./or%heet%.dd

    'e(t

    $..$. 76ile )oo&

    A whi!e !oop is a contro! f!owstatementthat a!!ows code to "e e+ecuted repeated!y "ased ona gien =oo!eancondition# The whi!e !oop can "e thought of as a repeating if statement#e#g#+ J 076ile(*3 45 = ( 6 17 = ( 6 1K

    $..$.$ %o )oo&

    A o Whi!e !oop is used as a contro! f!ow statement within the code to run a part of itrepeated!y unti! a certain condition is achieed-e#g#%o L Statement 38K 76ile 8condition9:

    $..$.' Select CaseThe purpose of a >e!ect Case@ statement is to a!!ow the a!ue of a aria"!eor e+pression tocontro! the f!ow of program e+ecution ia a mu!tiway "ranch(or Mgo toM, one of seera! !a"e!s)#The main reasons for using a switch inc!ude improing c!arity, "y reducing otherwise repetitiecoding, and (if the heuristicspermit) a!so offering the potentia! for faster e+ecution througheasier compi!er optimiDationin many cases#

    e#g#

    Select CaseCaseCondition13Statement1

    ate of &ssue- ./*0/*10./ Page .0 of .2

    ocument Tit!e- Automation tandards

    http://en.wikipedia.org/wiki/Control_flowhttp://en.wikipedia.org/wiki/Statement_(programming)http://en.wikipedia.org/wiki/Boolean_datatypehttp://en.wikipedia.org/wiki/Conditional_(programming)http://en.wikipedia.org/wiki/Variable_(programming)http://en.wikipedia.org/wiki/Multiway_branchhttp://en.wikipedia.org/wiki/Gotohttp://en.wikipedia.org/wiki/Label_(programming_language)http://en.wikipedia.org/wiki/Label_(programming_language)http://en.wikipedia.org/wiki/Heuristichttp://en.wikipedia.org/wiki/Compiler_optimizationhttp://www.vodafone.com/http://en.wikipedia.org/wiki/Control_flowhttp://en.wikipedia.org/wiki/Statement_(programming)http://en.wikipedia.org/wiki/Boolean_datatypehttp://en.wikipedia.org/wiki/Conditional_(programming)http://en.wikipedia.org/wiki/Variable_(programming)http://en.wikipedia.org/wiki/Multiway_branchhttp://en.wikipedia.org/wiki/Gotohttp://en.wikipedia.org/wiki/Label_(programming_language)http://en.wikipedia.org/wiki/Heuristichttp://en.wikipedia.org/wiki/Compiler_optimization
  • 8/11/2019 ART Automation Standards Document v0.1

    11/17

    EVO ART Company Restricted

    CaseCondition23Statement2End Select&!!ustratie e+amp!e from the 3TP scripts is as "e!ow-

    Select Ca%e $ca%eTrimCla%%,'m33

    Ca%e !"T'!Set 9et,:eb;bject,9eneric = 9et,

  • 8/11/2019 ART Automation Standards Document v0.1

    12/17

    EVO ART Company Restricted

    $.'.1 Scri&t Revie" 7or#flo" %ia-ram

    ate of &ssue- ./*0/*10./ Page .1 of .2

    ocument Tit!e- Automation tandards

  • 8/11/2019 ART Automation Standards Document v0.1

    13/17

    EVO ART Company Restricted

    The ta"!e "e!ow gies an oeriew and a description of the aai!a"!e statuses#

    Status Description

    %esi-n The anua! Test cript has "een created

    7I The Author is wor$ing on the Automation of the manua! script#

    !or Revie" The cript is comp!ete and ready to "e reiewed #

    Re&air The cript does not meet the Test script standards or some test stepsneeds changes

    A&&roved The cript meets the Test cript standards and is accurate with respect toa!! the test steps#

    ate of &ssue- ./*0/*10./ Page ./ of .2

    ocument Tit!e- Automation tandards

    http://www.vodafone.com/
  • 8/11/2019 ART Automation Standards Document v0.1

    14/17

    EVO ART Company Restricted

    ' Execution Standards

    '.1 Execution !lo" Control

    EVO =usiness is ery much process drien, hence any*a!! "usiness transaction fo!!ow aparticu!ar seuence# This seuence is of prime importance to successfu!!y comp!ete a"usiness process or end'to'end scenario and has to "e adhered to# The Automated "usinessscenarios are maintained within the >Test 9a"@ modu!e of 3ua!ity Center#The indiidua! Test cripts used to create an end'to'end "usiness scenario are arranged isi"!e in the >E+ecution :rid@ ta" of >Test 9a"@ as "e!ow-

    The Test e+ecution f!ow and conditions for test e+ecution are maintained in the >E+ecution5!ow@ ta" of 3ua!ity Center as "e!ow-

    There are two conditions in the >E+ecution 5!ow@ for a test to run after the preious test hasrun, >5inished@ and >Passed@# epending upon the "usiness process these are set andmaintained#(ote/ +&t is a 3STto maintain the >E+ecution 5!ow@, een if the scripts hae "een arrangedin a proper seuence in the >E+ecution :rid@)

    ate of &ssue- ./*0/*10./ Page .4 of .2

    ocument Tit!e- Automation tandards

    http://www.vodafone.com/
  • 8/11/2019 ART Automation Standards Document v0.1

    15/17

    EVO ART Company Restricted

    '.2 %ata S6eet Set u&

    A!! the end'to'end automated scenarios in 3ua!ity Center are made up of indiidua! scripts*steps# &n order to ensure data porta"i!ity "etween these scripts, as output from one script may"e reuired as an input for su"seuent script, and other aria"!es, parameters are stored atthe scenario !ee! and is uniue to that indiidua! scenario# This approach a!so he!ps tocapture critica! num"ers (e#g# Purchase Order), te+t and other detai!s as eidence#This datasheet a!so stores the !ogin credentia!s and other !ogin detai!s such as c!ient, ur! etc#,there"y ensuring enironment porta"i!ity# Which means, if an e+isting script to !ogin has to "edirected to any other AP enironment, we wou!d 7ust need to modify the parameters with thedatasheet#The datasheet "eing stored at the scenario !ee! he!ps the unitary approach of scripting andconsistent aai!a"i!ity of the test parameters to each script in the scenario#

    ate of &ssue- ./*0/*10./ Page .< of .2

    ocument Tit!e- Automation tandards

    http://www.vodafone.com/
  • 8/11/2019 ART Automation Standards Document v0.1

    16/17

    EVO ART Company Restricted

    A&&endix 1 ( Exam&le !unction )ibrary *eaderThe 5unction 9i"rary header is as "e!ow

    A&&endix 2+ Exam&le !unction *eaderThe function header is as "e!ow

    A&&endix ( Exam&le Automation scri&t utili,in- anual testtem&late and im&lementin- flo" control

    ate of &ssue- ./*0/*10./ Page . of .2

    ocument Tit!e- Automation tandards

    http://www.vodafone.com/
  • 8/11/2019 ART Automation Standards Document v0.1

    17/17

    EVO ART Company Restricted

    %ocument Control

    i. Version *istory

    This ta"!e records the status and ersion history of this de!iera"!e#

    Version %ate Aut6or Version *istory

    0#. .4*0/*10./ ohammed As!am raft

    0#1

    0#