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 They may not show up well on other PowerPoint versions. You can download PowerPoint 2010 viewer from here. These slides contain a lot of animations. For optimal results, watch in slideshow mode.

2 [Extra] 100 fish How long will they take to catch all fish? Less than 1 hour Around 1 hour About 100 hours Forever 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 [Extra] who wants maximum publicity
Do you want maximum publicity for your mistakes?

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

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

11 MSLogic Unit testing History UI MSLogic History UI Storage Storage

12 MSLogic Unit testing History UI MSLogic History UI Storage Storage

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

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

15 Testing frameworks String item = msLogic.getItem(1);
if(!item.equals(“Item1”) print(“Case 1 failed”); Testing frameworks assertEquals(msLogic.getItem(1), “Item1”); JUnit

16

17

18 Unit testing Developer testing Automated A type of UI History MSLogic
Storage Developer testing A type of

19 Test-Driven Development (TDD)
SUT

20 Test-Driven Development (TDD)
Write a failing test Write code to pass test

21 CityConnectTest.java CityConnect.java

22 CityConnectTest.java CityConnect.java

23 Write the java code for the above
CityConnectTest.java CityConnect.java We want have this. Clementi  true Novena  true Eunos  true Changi  false Clementi, Eunos, 20 Eunos, Novena, 40 Write the java code for the above

24 CityConnectTest.java CityConnect.java
But, we are not going to write it at first.

25 CityConnectTest.java CityConnect.java

26 CityConnectTest.java CityConnect.java

27 CityConnectTest.java CityConnect.java

28 CityConnectTest.java CityConnect.java

29 CityConnectTest.java CityConnect.java

30 CityConnectTest.java CityConnect.java

31 CityConnectTest.java CityConnect.java

32 CityConnectTest.java CityConnect.java

33 CityConnectTest.java CityConnect.java

34 CityConnectTest.java CityConnect.java

35 CityConnectTest.java CityConnect.java

36 CityConnectTest.java CityConnect.java

37 CityConnectTest.java CityConnect.java

38 CityConnectTest.java CityConnect.java

39 CityConnectTest.java CityConnect.java

40 CityConnectTest.java CityConnect.java

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

42 Test-Driven Development (TDD)
Write a failing test Write code to pass test

43

44

45 125,000 Lines of Code 100+ developers

46

47 Automated tests

48 [extra] Mozilla patch policy

49 When the system test fails...

50 Must have automated developer tests!

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

52


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