Скачать презентацию Requirements Engineering Project Management Lecture 7 Acceptance Скачать презентацию Requirements Engineering Project Management Lecture 7 Acceptance

49d2597b7a626a34cc724de5d856f3ef.ppt

  • Количество слайдов: 23

Requirements Engineering & Project Management Lecture 7 Acceptance Testing (1) Jerzy. Nawrocki@put. poznan. pl Requirements Engineering & Project Management Lecture 7 Acceptance Testing (1) Jerzy. Nawrocki@put. poznan. pl www. cs. put. poznan. pl/jnawrocki/re quire/ J. Nawrocki, Jerzy R. Copyright, 2006 Acceptance Testing

The V Model Requirements spec. Design Coding J. Nawrocki, Acceptance Testing Acceptance tests Integration The V Model Requirements spec. Design Coding J. Nawrocki, Acceptance Testing Acceptance tests Integration tests Unit tests

Model V Requirements spec. Design Coding J. Nawrocki, Acceptance Testing Custom er Acceptance tests Model V Requirements spec. Design Coding J. Nawrocki, Acceptance Testing Custom er Acceptance tests Integration tests Unit tests

Introduction Test-driven development Acceptance tests: customer Automated accept. testing A. testing: customer+tester J. Nawrocki, Introduction Test-driven development Acceptance tests: customer Automated accept. testing A. testing: customer+tester J. Nawrocki, Acceptance Testing Progress measurement based

Extreme Programming Number of tests Acceptance testing -> Progress measurement Weeks J. Nawrocki, Acceptance Extreme Programming Number of tests Acceptance testing -> Progress measurement Weeks J. Nawrocki, Acceptance Testing

Introduction – What is Rational Robot? Robo t Baselin e J. Nawrocki, Acceptance Testing Introduction – What is Rational Robot? Robo t Baselin e J. Nawrocki, Acceptance Testing Baselin e

What is test automation? 1. Buy a test execution tool. That’s simple! 2. Record What is test automation? 1. Buy a test execution tool. That’s simple! 2. Record the manual tests. 3. Play the tests back whenever you want to. „Just as there is more to software design than knowing a programming language, there is more to automating testing than knowing a testing tool. ” J. Nawrocki, Acceptance Testing -- M. Fewster & D. Graham

Manual or Automatic Testing? The amount of effort to automate a test case: 2 Manual or Automatic Testing? The amount of effort to automate a test case: 2 – 10 times the effort required to run the test manually (!) J. Nawrocki, Acceptance Testing

Introduction – Rational Robot and test-first coding Remarks: • When you start testing an Introduction – Rational Robot and test-first coding Remarks: • When you start testing an application is ready. • Rational Robot is for regression testing, not for test-first coding. • The only chance for test-first coding is SQABasic. J. Nawrocki, Acceptance Testing

Testing HTML Applications Start. Browser [ URL$, ] [ Window. Tag= Name$ ] Web Testing HTML Applications Start. Browser [ URL$, ] [ Window. Tag= Name$ ] Web page address Identifies this instance of the browser • Starts the browser, • enables HTML testing, and • loads a page if specified. Start. Browser "http: //www. cs. put. poznan. pl/jnawrocki/models/", "Window. Tag= Parent" J. Nawrocki, Acceptance Testing

Testing HTML Applications Browser action$, rec. Method$, parameters$ Back, Forward, New. Page, Set. Frame, Testing HTML Applications Browser action$, rec. Method$, parameters$ Back, Forward, New. Page, Set. Frame, Close. Win, . . HTMLTitle=$, Name=$, "". . • Performs an action on a Web browser Browser New. Page, "" Wait for the topmost frame J. Nawrocki, Acceptance Testing Wait= % default time is 30 s

Testing HTML Applications HTML action%, rec. Method$, parameters$ Click, . . HTMLTitle=$, Name=$, Testing HTML Applications HTML action%, rec. Method$, parameters$ Click, . . HTMLTitle=$, Name=$, "". . Coords= x, y • Performs a mouse action on an HTML tag. HTML Click, "Name= Autor", "Coords= 10, 12" J. Nawrocki, Acceptance Testing

SQABasic HTMLDocument Click, SQABasic HTMLDocument Click, "Type=HTMLDocument; Index=1", "Coords=25, 14 " Result = HTMLTable. VP (Compare. Data, "Type=HTMLTable; Index=1", "VP=Weryfikacja_ daty") Test. DatastoreDefault. Test. Script. DatastoreTMS_Scriptvptest 7. Wer J. Nawrocki, Acceptance Testing yfikacja_daty. base. grd

An alternative to Rational Robot http. Unit Based on j. Unit For programmers! J. An alternative to Rational Robot http. Unit Based on j. Unit For programmers! J. Nawrocki, Acceptance Testing

Data-driven scripts Data-driven scripting = Test inputs stored in a separate (data) file. countries, Data-driven scripts Data-driven scripting = Test inputs stored in a separate (data) file. countries, Sweden, USA, countries 2 countries, France, Germany, test 2 countries, Austria, Italy, test 3 J. Nawrocki, Acceptance Testing

Data-driven scripts Data-driven scripting = Test inputs stored in a separate (data) file. Control Data-driven scripts Data-driven scripting = Test inputs stored in a separate (data) file. Control Open. File ‘Scribble. Data’ For each record in Scribble. Data Read INPUTFILE Read NAME 1 Read NAME 2 Read OUTPUTFILE Call Scribble. Open (INPUTFILE) Focus. On ‘Scribble’ Select. Option ‘List/Add Item’ Focus. On ‘Add Item’ Type NAME 1 Left. Mouse. Click ‘OK’. . . End. For script Scribble. Dat USA, countries 2 a countries, Sweden, countries, France, Germany, test 2 countries, Austria, Italy, test 3 J. Nawrocki, Acceptance Testing

A more sophisticated data-driven script Open. File ‘Scribble. Data’ Control Read INPUTFILE script Call A more sophisticated data-driven script Open. File ‘Scribble. Data’ Control Read INPUTFILE script Call Scribble. Open (INPUTFILE) Go to next record (ie row) For each record in Scribble. Data Scribble. Dat Read ADDNAME a If ADDNAME <> Blank Then { countries Focus. On ‘Scribble’ Select. Option ‘List/Add Item’ Swede Focus. On ‘Add Item’ n Type ADDNAME Left. Mouse. Click ‘OK} USA Read MOVEFROM 4 1 Read MOVETO. . . Norwa End. For y J. Nawrocki, Acceptance Testing 2 7

Data-driven scripts Additional automated regression test cases Software under test Key automated regression test Data-driven scripts Additional automated regression test cases Software under test Key automated regression test J. Nawrocki, Acceptance Testing cases

Keyword-driven scripts Keyword-driven script = A data-driven scripts augmented with keywords representing user actions. Keyword-driven scripts Keyword-driven script = A data-driven scripts augmented with keywords representing user actions. SQABasic? ? ? Test Scribble. Open countries file Add. To. List Sweden USA Save. As countries 2 Control For each script TEST_ID Open. File TEST_ID For each record in test file Read KEYWORD Call KEYWORD End. For Close. File TEST_ID End. For J. Nawrocki, Acceptance Testing Supporting Scribble. Open scripts. . . Add. To. List. . . Save. As. . .

Shared scripts Shared script = A script used (shared) by more than one test Shared scripts Shared script = A script used (shared) by more than one test case. SQABasic Call Scribble. Open (‘countries’) Focus. On ‘Scribble’ Select. Option ‘List/Add Item’. . . Call Scribble. Save. As (‘countries 2’) J. Nawrocki, Acceptance Testing

Automating test execution Automated scripts are not like manual scripts Don’t automate testing by Automating test execution Automated scripts are not like manual scripts Don’t automate testing by simply recording Automated execution with manual verification? How much shoul be compared (whole, minimum, something between)? Dynamic comparison and post-execution comparison Automated comparison messages have to be J. Nawrocki, Acceptance Testing

Test activities Identify test conditions (‘what’ to test) and prioritize Design test cases (‘how’ Test activities Identify test conditions (‘what’ to test) and prioritize Design test cases (‘how’ to test) Build test cases (scripts, data etc. ) Execute test cases Compare test outcomes to expected outcomes J. Nawrocki, Acceptance Testing

Questions? J. Nawrocki, Acceptance Testing Questions? J. Nawrocki, Acceptance Testing