Test Autom ation and Test Autom ation and Keyw ord-driven testing - - PowerPoint PPT Presentation

test autom ation and test autom ation and keyw ord driven
SMART_READER_LITE
LIVE PREVIEW

Test Autom ation and Test Autom ation and Keyw ord-driven testing - - PowerPoint PPT Presentation

Test Autom ation and Test Autom ation and Keyw ord-driven testing Brian Nielsen, bnielsen@cs.aau.dk 3 Script Based Testing 3. Script-Based Testing + / - test impl. = programming + automatic execution + auto regression testing + auto


slide-1
SLIDE 1

Test Autom ation and Test Autom ation and Keyw ord-driven testing

Brian Nielsen,

bnielsen@cs.aau.dk

slide-2
SLIDE 2

3 Script Based Testing

  • 3. Script-Based Testing

+ / - test impl. = programming + automatic execution + auto regression testing + auto regression testing fragile tests break easily? (depends on abstraction) (depends on abstraction)

  • ad-hoc coverage
  • no coverage measurement
slide-3
SLIDE 3

4 Keyword Driven Testing

  • 4. Keyword-Driven Testing

+ abstract tests + automatic execution + auto regression testing + auto regression testing

  • robust tests
  • ad-hoc coverage

ad hoc coverage

  • no coverage measurement
slide-4
SLIDE 4

Script based Testing Script-based Testing

Test inputs and observations (verdict assignment) programmed in scripts in g ) p g p dedicated or general-purpose languages.

+ Repeatable (for regression testing) + Repeatable (for regression testing) + Data driven testing: Fixed scripts, each parameterized with different data d e e da a – Mixes test harness and logical test cases – Must be updated when specs (or impl) change Must be updated when specs (or impl) change – Very lengthy – Good programmers may write well-structured Good programmers may write well structured reusable test code but ”it is just test code”

slide-5
SLIDE 5

Keyword Driven Testing y g

  • Script based automation where test case

d i i t d f t ti design is separated from automation

– Focus on actions user/environment can do on

  • bjects in SUT (at different abstraction levels)
  • ”Actions” appear in scripts,

pp p

  • ”Action-code” implements the action
  • aka “Action-word” testing (or table driven
  • aka Action-word testing (or, table driven

testing), < 1994

  • Black-box, subsystem, accept tests
  • Automated execution using a “framework”.

Automated execution using a framework .

slide-6
SLIDE 6

Keyword Driven Testing y g

+ Concise, flexible, maintainable, + Read-/writeable by non-programmers

÷ Expressiveness of a scripting language

C t l t t d l t ti – Control structures and complex computations

– (Branching in test cases, complex data, matching of expected results)

slide-7
SLIDE 7

Keyword Driven Test y

Object Keyword Value

  • Eg. Sequence

LoginDialog Login ”badUserId”, ”GoodPass” VerifyLogin ”Login failed” VerifyLogin Login failed LoginDialog Login ”goodUserId”, ”badPass” VerifyLogin ”Login failed” LoginDialog Login ”goodUserId”, ”GoodPass” VerifyLogin ”welcome” W l Di l h L i ” U N ” ” d” WelcomeDialog changeLogin ”newUserName”,”newpwd” confirm ”goodUserId”, ”newpwd” confirmChange ”Change Failed”

slide-8
SLIDE 8

KWD Process

Test Expert Automation Expert

http: / / www.softwaretestinghelp.com/ wp-content/ qa/ uploads/ 2010/ 01/ keyword-driven-testing.pdf

slide-9
SLIDE 9

Automation Fixture Automation Fixture

Keywod Script Keywod Script

Open(Scripts)

Engine/driver Generic Libs (fixtures)

While(!EOF){ Keyword, data=readFile(); Case(keyword){ L i id t > b it(d t )

(fixtures)

Login: widget->submit(data); verifyLogin: …

Application Libs (keyword functions)

} Close()

SUT

}

slide-10
SLIDE 10

Tools

  • SAFS, open source
  • EMOS Framework, open source
  • FIT/FitNesse open source
  • FIT/FitNesse, open source
  • Certify, Worksoft
  • Unified TestPro, SDT
  • TestFrame LogicaCMG
  • TestFrame, LogicaCMG
  • TestArchitect, LogiGear
  • Tools with built-in keyword support:

TestQuest Pro – TestQuest Pro, – QuickTest Professional

slide-11
SLIDE 11

Example Example

http: / / localhost: 8080/ FitBookExamples.Chapter4TestingActions.Fig6TestChatServer

slide-12
SLIDE 12

http: / / fit.c2.com/ wiki.cgi?FitBook http: / / my.safaribooksonline.com/ 0321269349

slide-13
SLIDE 13

Comparison p

Criteria

Manual Script KWD Model-Based Cost Development L M M L Cost Development L M M L Maintenance H? H L Tools/equip L M M H q p Time Time to first test L M M M-H Re-execution H L L L Maintenance L H H L Learn- ability Skills L H M* H* ability Maturity L M M-H H Readability L L M H* I t t / Ch ll i L M M H Interest / Challenging L M M H Effective- ness Bug detection H L L H Tracability L L M H Tracability L L M H Coverage L L M H

slide-14
SLIDE 14

References References

  • http://en.wikipedia.org/wiki/Keyword-driven_testing
  • http://www.cs.waikato.ac.nz/~marku/mbt/
  • http://www.onestoptesting.com/automation-

framework/keyword-driven-testing/

  • http://www.softwaretestinghelp.com/wp-

content/qa/uploads/2010/01/keyword-driven-testing.pdf

  • http://www.musala.com/press/PR_2008_03_17/pr/Keyw

d d i %20T ti df

  • rd-driven%20Testing.pdf
  • Mark Fewster and Dorothy Graham, Software Test

Automation 1999 (Chapter 22) Automation, 1999 (Chapter 22)

  • M. Utting Practical Model-based testing