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.

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."— 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. 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 How long will they take to catch all fish? a)Less than 1 hour b)Around 1 hour c)About 100 hours d)Forever [Extra] 100 fish If 100 people trying to catch 100 piranha fish in a lake. On average, one person can catch one fish within 1 hour

3 [Extra] 100 fish

4 System testing SUT

5

6 System testing SUT

7 System testing SUT

8 Do you want maximum publicity for your mistakes? [Extra] who wants maximum publicity

9 Do you want maximum publicity for your mistakes?

10 Never too early to test: An Introduction to Early Developer Testing CS2103/T, Lecture 4, Part 2, [Sep 4, 2015]

11 UI MSLogic Storage History UI MSLogic Storage History

12 UI MSLogic Storage History UI MSLogic Storage History

13 UI MSLogic Storage History SUT Unit testing

14 UI MSLogic Storage History SUT Unit testing

15 UI MSLogic Storage History SUT Stub Test Driver Unit testing

16 UI MSLogic Storage History SUT== MSLogic Stub String retrieveFromDatabase (int key){ if(key==1) return “Item for key 1”; if(key==2) return “Item for key 2”; … Unit testing

17 UI MSLogic Storage History SUT== MSLogic Stub Test Driver String item = msLogic.getItem(1); if(!item.equals(“Item1”) print(“Case 1 failed”); … Unit testing

18 UI MSLogic Storage History SUT== MSLogic Stub Test Driver String item = msLogic.getItem(1); if(!item.equals(“Item1”) print(“Case 1 failed”); … Unit testing

19 String item = msLogic.getItem(1); if(!item.equals(“Item1”) print(“Case 1 failed”); … assertEquals(msLogic.getItem(1), “Item1”); JUnit (Java) Visual Studio Native Tests (C++)

20

21

22 UI MSLogic Storage History

23 UI MSLogic Storage History

24 UI MSLogic Storage History

25 UI MSLogic Storage History

26 UI MSLogic Storage History

27 UI MSLogic Storage History

28 SUT

29 Write a failing test Write code to pass test

30 CityConnect.java CityConnectTest.java

31 CityConnect.java CityConnectTest.java

32 CityConnect.java CityConnectTest.java Clementi, Eunos, 20 Eunos, Novena, 40 Clementi  true Novena  true Eunos  true Changi  false Write the java/c++/pseudo code for the above

33 CityConnect.java CityConnectTest.java

34 CityConnect.java CityConnectTest.java

35 CityConnect.java CityConnectTest.java

36 CityConnect.java CityConnectTest.java

37 CityConnect.java CityConnectTest.java

38 CityConnect.java CityConnectTest.java

39 CityConnect.java CityConnectTest.java

40 CityConnect.java CityConnectTest.java

41 CityConnect.java CityConnectTest.java

42 CityConnect.java CityConnectTest.java

43 CityConnect.java CityConnectTest.java

44 CityConnect.java CityConnectTest.java

45 CityConnect.java CityConnectTest.java

46 CityConnect.java CityConnectTest.java

47 CityConnect.java CityConnectTest.java

48 CityConnect.java CityConnectTest.java

49 CityConnect.java CityConnectTest.java

50 CityConnect.java CityConnectTest.java Note: more test cases required. Refactor as necessary.

51 Write a failing test Write code to pass test

52

53

54

55 100+ developers 300,000 Lines of Code

56

57 Automated tests

58 [extra] Mozilla patch policy 58

59 When the system test fails...

60 Must have automated developer tests!

61 Only system testing? NO It can save your career. Use automated test driver frameworks Can do in TDD fashion Must do developer testing

62 Should do this too Everyone should do some Use these Do in CE2, Optional in project

63


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."

Similar presentations


Ads by Google