Pobieranie prezentacji. Proszę czekać

Pobieranie prezentacji. Proszę czekać

Acceptance Testing (2) Copyright, 2006  Jerzy R. Nawrocki Requirements Engineering.

Podobne prezentacje


Prezentacja na temat: "Acceptance Testing (2) Copyright, 2006  Jerzy R. Nawrocki Requirements Engineering."— Zapis prezentacji:

1 Acceptance Testing (2) Jerzy.Nawrocki@put.poznan.pl www.cs.put.poznan.pl/jnawrocki/require/ Copyright, 2006  Jerzy R. Nawrocki Requirements Engineering & Project Management Lecture 8

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

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

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

5 J.Nawrocki, Acceptance Testing Introduction – What is Rational Robot? Baseline Robot

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

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

8 J.Nawrocki, Acceptance Testing Keyword-driven scripts Keyword-driven script = A data-driven scripts augmented with keywords representing user actions. ScribbleOpen countries AddToList Sweden USA SaveAs countries2

9 J.Nawrocki, Acceptance Testing Shared scripts Shared script = A script used (shared) by more than one test case. SQABasic Call ScribbleOpen (‘countries’) FocusOn ‘Scribble’ SelectOption ‘List/Add Item’... Call ScribbleSaveAs (‘countries2’)

10 J.Nawrocki, Acceptance Testing 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

11 J.Nawrocki, Acceptance Testing The manual test process Unscripted manual testing: 1.Identify conditions to test 2.Think up specific inputs 3.Enter the inputs 4.Checked it worked OK

12 J.Nawrocki, Acceptance Testing The manual test process Unscripted manual testing Vague manual scripts: 1.Read what to do 2.Think up specific inputs 3.Enter the inputs 4.Checked it worked OK

13 J.Nawrocki, Acceptance Testing Vague manual script 1 Run up Scribble File menu displayed 2 Open file with sorted ListFile contents displayed 3 Add some items to ListItems added in order 4 Move an itemItem moved, List now unsorted 5 Add an itemItem added at end of List 6 Delete item form listItem deleted 7 Use invalid position numberError message displayed to delete an item 8 Save changes in new fileEnd of test

14 J.Nawrocki, Acceptance Testing An example test case Prerequisites: logged into the purchase order system as a data entry clerk; database system must contain the standard Data Set; no other new purchase order activity on the system. StepInputExp.outCond. 1 Create a new order for any one standard order, setting quantity to 100 Order confirmation message displayed VB10 VB23 2 Confirm the orderPurchase order printed VB10 3 Print a new orders reportNew orders report printed showing just this one new order VB10 VB23 4 Cancel the orderPurchase order cancellation notice printed V8

15 J.Nawrocki, Acceptance Testing The manual test process Unscripted manual testing Vague manual scripts Detailed manual scripts: 1.Read what to do 2.Enter the inputs 3.Checked it worked OK

16 J.Nawrocki, Acceptance Testing Detailed manual script 1 Click on Scribble iconScribble opened, File menu enabled 2 Move mouse to File menu, clickOptions available: Open, New, Exit 3 Move mouse to Open option,Filenames displayed including clickcountries.dcm 4 Move mouse to countries.dcmText plus List of 3 countries: Belgium, Netherlands, UK, File and List menus displayed...

17 J.Nawrocki, Acceptance Testing 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

18 J.Nawrocki, Acceptance Testing Internet-based Book Store

19 J.Nawrocki, Acceptance Testing Test conditions Kupno pojedynczej książki Kupno książek, które będą wysłane w kilku paczkach Nieefektywny zakup książki Sprawdzenie co się dzieje z kupionymi książkami Dodanie swojej recenzji Zapłata kartą płatniczą Zapłata czekiem...

20 J.Nawrocki, Acceptance Testing Priorities Kupno pojedynczej książki Kupno książek, które będą wysłane w kilku paczkach Nieefektywny zakup książki Sprawdzenie co się dzieje z kupionymi książkami Dodanie swojej recenzji Zapłata kartą płatniczą Zapłata czekiem...

21 J.Nawrocki, Acceptance Testing Test scenario design Ineffective purchase: 1 Klient wkłada do koszyka książki 2 Klient wyjmuje z koszyka wszystkie włożone książki Ineffective purchase: 1 Klient wkłada do koszyka książki 2 Klient wyjmuje z koszyka wszystkie włożone książki 3 Klient wkłada do koszyka książkę 4 Klient wyjmuje z koszyka książkę

22 J.Nawrocki, Acceptance Testing UC-based Test Scenario Zakup książki 1. Klient przegląda książki dostępne w księgarni. 2. Klient wkłada do koszyka wybraną książkę. 3. Klient przechodzi do sfinalizowania zakupu. 4. System prosi o podanie adresu i danych do faktury. 5. Klient podaje adres i dane do faktury. 6. System prosi o wybranie sposobu zapłaty. 7. Klient płaci za książkę w wybrany sposób. 8. System dziękuje za zakup i informuje o przesyłce. Wyjątki 3a. Klient chce rozważyć możliwość zakupu jeszcze jednej książki. 3a1. Następuje powrót do kroku 1. 3b. Klient chce zrezygnować z zakupu książki, którą ma w koszyku. 3b1. Klient wyjmuje książkę z koszyka

23 J.Nawrocki, Acceptance Testing UC-based Test Scenario Zakup książki 1. Klient przegląda książki dostępne w księgarni. 2. Klient wkłada do koszyka wybraną książkę. 3. Klient przechodzi do sfinalizowania zakupu. 4. System prosi o podanie adresu i danych do faktury. 5. Klient podaje adres i dane do faktury. 6. System prosi o wybranie sposobu zapłaty. 7. Klient płaci za książkę w wybrany sposób. 8. System dziękuje za zakup i informuje o przesyłce. Wyjątki 3a. Klient chce rozważyć możliwość zakupu jeszcze jednej książki. 3a1. Następuje powrót do kroku 1. 3b. Klient chce zrezygnować z zakupu książki, którą ma w koszyku. 3b1. Klient wyjmuje książkę z koszyka...

24 J.Nawrocki, Acceptance Testing Building Test Cases int LiczbaCyfr(int n) 0 [1-9] [10-99] [100-999]... [.. –1] 1, 9 10, 99 100, 999, 255, 256 2 15 0

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

26 J.Nawrocki, Acceptance Testing 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

27 J.Nawrocki, Acceptance Testing Test activities Identify important scenarios (criticality/frequency) and prioritize Instantiate the selected scenarios (1 -> *) Implement (scripts, data etc.) Execute test cases Compare test outcomes to expected outcomes

28 J.Nawrocki, Acceptance Testing Quality attributes of a test case How effective in detecting defects? How exemplary ? (the more exemplary, the less test cases needed) How economic ? How evolvable ? (maintenance effort)

29 J.Nawrocki, Acceptance Testing Test automation effects Effective Exemplary Evolvable Economic

30 J.Nawrocki, Acceptance Testing Summary SDS test development: 1. Use cases 2. Manual test scenarios 3. Automated test scripts 4. Test cases sharing the scripts httpUnit or Rational Robot?

31 J.Nawrocki, Acceptance Testing Questions?

32 J.Nawrocki, Acceptance Testing Presentation Contents Testing Life Cycle The Scribble Application The Manual Test Process Test Automation Use-Case-Based Acceptance Testing

33 J.Nawrocki, Acceptance Testing Test activities Identify test conditions (‘what’ to test) and prioritize  val i > Value subject to  size i  Capacity Knapsack problem 10 911 12 88 10 15 size i val i Capacity Value

34 J.Nawrocki, Acceptance Testing Presentation Contents Testing Life Cycle The Scribble Application The Manual Test Process Test Automation Use-Case-Based Acceptance Testing

35 J.Nawrocki, Acceptance Testing Presentation Contents Testing Life Cycle The Scribble Application The Manual Test Process Test Automation Use-Case-Based Acceptance Testing

36 J.Nawrocki, Acceptance Testing Test activities Identify important scenarios (criticality/frequency) and prioritize Instantiate the selected scenarios (1 -> *) Implement (scripts, data etc.) Execute test cases Compare test outcomes to expected outcomes

37 J.Nawrocki, Acceptance Testing Use case goal levels Book tripBook hotelBook flight User Goal Level Book trip Summary Level Book trip Book hotelBook flight Find flight Reserve seat Find hotel Reserve room Subfunction Level

38 J.Nawrocki, Acceptance Testing Test coverage GetSoftwareG1:0 SelectAProjectG1:0 GetInfoAboutProjectsG1:0 RegisterACustomerG1:1Z1:1 SubmitAProposalG1:0R1:0U1:0 Scenario Total calls

39 J.Nawrocki, Acceptance Testing Use-Case Example Success Guarantees Success Guarantees: Requestor has goods, correct budet ready do be debited. Trigger Trigger: Requestor decides to buy something. Main Success Scenario 1.Requestor 1.Requestor: Initiate a request. 2.Approver 2.Approver: Check money in the budget, check price of goods, complete request for submission. 3.Buyer 3.Buyer: Check contents of storage, find best vendor for goods. 4.Authorizer 4.Authorizer: Validate Approver’s signature....Extensions 1a. Requestor does not know vendor or price: leave those parts blank and continue.

40 J.Nawrocki, Acceptance Testing Test scenario Aktor: Reprezentant klienta Cel: Zarejestrowanie organizacji klienta w bazie danych SDS Pochodzi z: przypadku użycia RegisterACustomer [RegCust] Autor: J.Nawrocki; Zmodyfikowano: 28.11.2003 Scenariusz: Główny scenariusz – G1 Scenariusze pomocniczych przypadków: - Warunki wstępne: Firma X nie jest zarejestrowana jako reprezentant klienta. Punkt wejścia: Przeglądarka internetowa (Internet Explorer 5.0) Krok Akcja aktoraSpodziewany rezultat Pro1Otwórz stronę SDS-u.Strona SDS jest otwarta. 1Otwórz formularz rejestracji.Formularz otwarty [ReqCust- Form]. 2Wprowadź dane Firmy X [CustInfo] i wyślij je. Zostaje wyświetlony komunikat “Registration confirmed” [ReqCust-Confirm].

41 J.Nawrocki, Acceptance Testing Test scenario – Screen shots RegCust-FormRegCust-Confirm


Pobierz ppt "Acceptance Testing (2) Copyright, 2006  Jerzy R. Nawrocki Requirements Engineering."

Podobne prezentacje


Reklamy Google