Presentation is loading. Please wait.

Presentation is loading. Please wait.

WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010/2013.

Similar presentations


Presentation on theme: "WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010/2013."— Presentation transcript:

1 WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010/2013. They may not show up well on other PowerPoint versions. You can download PowerPoint 2010 viewer from here. here These slides contain a lot of animations. For optimal results, watch in slideshow mode.

2 Can a butterfly flapping its wings cause a tornado somewhere else in the world?

3

4

5

6 Bug fix → break other code?

7 [undesirable side effects of modifications] Bug fix → break other code?

8 [undesirable side effects of modifications] Bug fix → break other code?

9 [undesirable side effects of modifications] Bug fix → break other code?

10 Stop butterflies from causing tornadoes: preventing CS2103/T, Lecture 1, Part 3, [Aug 14, 2015]

11 Stop butterflies from causing tornadoes: preventing CS2103/T, Lecture 1, Part 3, [Aug 14, 2015]

12 Stop butterflies from causing tornadoes: preventing CS2103/T, Lecture 1, Part 3, [Aug 14, 2015]

13 TEST CASE Software Under Test (SUT) test input actual output expected output Compare Locate bug modify other test cases Regression testing mismatch = bug located! How to prevent?

14 TEST CASE Software Under Test (SUT) test input actual output expected output Compare Locate bug modify other test cases Regression testing mismatch = bug located! … is the re-running of existing tests to detect regressions.

15 TEST CASE Software Under Test (SUT) test input actual output expected output Compare Locate bug modify other test cases Regression test mismatch = bug located!

16 Software Under Test (SUT) test input mismatch = actual output expected output Compare Debug modify bug located! TEST CASE other test cases Regression test

17 Software Under Test (SUT) test input mismatch = actual output expected output Compare Debug modify bug located! TEST CASE other test cases Regression test

18 Software Under Test (SUT) test input mismatch = actual output expected output Compare Debug modify bug located! TEST CASE other test cases Regression test For this to work: 1. Document test cases 2. Automate testing

19 Example SUT (Text UI Minesweeper)

20

21

22

23

24 1. Document test cases scripted testing exploratory testing Test case 1: input: expected: Test case 2: input:

25 2. Automate testing (for Text UIs) TEST CASE 1 expected output TEST CASE 2 expected output TEST CASE 3 expected output test input

26 2. Automate testing (for Text UIs) TEST CASE 1 expected output TEST CASE 2 expected output TEST CASE 3 expected output test input

27 2. Automate testing (for Text UIs) expected output test input

28 2. Automate testing (for Text UIs) C:\MinesweeperTextUI.exe FC actual.txt expected.txt Comparing files actual.txt and expected.txt FC: no differences encountered C:\MinesweeperTextUI.exe FC actual.txt expected.txt Comparing files actual.txt and expected.txt FC: no differences encountered actual.txt C:\

29 To prevent ……………….. Exploratory or …………..? Manual or ……………….? To make regression testing practical ………….?

30 Framework Platform Specify requirements… Textual descriptions Feature list User stories Use cases OO domain models Object diagrams State machine diagrams Activity diagrams UI prototypes Glossary Supplementary requirements … Combat complexity… Use abstraction, build models System Detailed design BAC D Possible Improvements: Apply OO principles Apply analysis patterns Categorize and prioritize requirements Possible Improvements: ↑Cohesion, ↓Coupling Apply design patterns (Abstraction Occurrence, Singleton, Command, Observer) Apply design principles (Open/close, Law of Demeter, Separation of concerns, …) Use polymorphism (inheritance, interfaces, dynamic binding) Good product design guidelines (e.g., usability, …) Possible Improvements: Refactor code Coding standards and good coding practices Protect code using assertions, exceptions, logging, and defensive coding. Build automation Possible Improvements: Automate testing Use Test-Driven Development Increase efficiency and effectiveness of testing (Equivalence partitioning, Boundary Value analysis) Increase test coverage (function/entry/exit/statement/branch/ condition/path coverage) isolate SUT using drivers, stubs and dependency injection Unit testing Integration testing System testing Acceptance testing Alpha/beta testing Developer testing Made up as you go → Exploratory testing Predetermined → Scripted testing Can be created in these ways: o Black-box, Glass-box, Grey-box = Validation & Verification Testing Other V&V techniques: formal verification static analyzers code reviews … Unified process Agile processes B API (Application Programming interface) Architecture styles such as n- tier, client-server, peer-to-peer, broker, pipes-and-filters, service-oriented, transaction- processing, and MVC Top-down design Bottom-up design Integration Can be late-one- time, or early- and-continuous Can be top- down, bottom- up, sandwich, big-bang y x z yx z operations Class diagrams Sequential Iterative Breadth- first Depth- first Work-breakdown structures Project plans Team structures C A B D BA D Sequence diagrams Architecture After modifications… Regression testing Includes buffers and milestones Chief-programmer Egoless Strict hierarchy XP (Complex) Problem domain Establish requirements… brainstorming Focus groups User surveys Product surveys Observations Interviews Prototyping More agile -> less upfront detailed design ANALYSIS DESIGNIMPLEMENTATIONQUALITY ASSURANCE PROJECT MANAGEMENT Library QA User Issue trackers Detailed design Test cases Scrum CMMI RCS We use OO to ‘align the view’. We use UML as the standard notation. Stakeholders Requirements Specification System Specification IDEs, Debugging

31 Hard work ahead!

32

33


Download ppt "WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010/2013."

Similar presentations


Ads by Google