Download presentation
Presentation is loading. Please wait.
Published byMilo McCormick Modified over 6 years ago
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 If 100 people trying to catch 100 piranha 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. On average, one person can catch one fish within 1 hour
3
[Extra] 100 fish If 100 people trying to catch 100 piranha 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. On average, one person can catch one fish within 1 hour
4
[Extra] 100 fish If 100 people trying to catch 100 piranha 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. On average, one person can catch one fish within 1 hour
5
System testing SUT
7
System testing SUT
8
System testing SUT
9
[Extra] who wants maximum publicity
Do you want maximum publicity for your mistakes?
10
[Extra] who wants maximum publicity
Do you want maximum publicity for your mistakes?
11
An Introduction to Early Developer Testing
Never too early to test: An Introduction to Early Developer Testing
12
MSLogic Unit testing History UI MSLogic History UI Storage Storage
13
MSLogic Unit testing History UI MSLogic History UI Storage Storage
14
Unit testing Test Driver Stub String item = msLogic.getItem(1);
UI SUT== MSLogic MSLogic History Storage Stub String item = msLogic.getItem(1); if(!item.equals(“Item1”) print(“Case 1 failed”); …
15
Unit testing Test Driver Stub String item = msLogic.getItem(1);
UI SUT== MSLogic MSLogic History Storage Stub String item = msLogic.getItem(1); if(!item.equals(“Item1”) print(“Case 1 failed”); …
16
Testing frameworks String item = msLogic.getItem(1);
if(!item.equals(“Item1”) print(“Case 1 failed”); … Testing frameworks assertEquals(msLogic.getItem(1), “Item1”); JUnit
19
Unit testing Developer testing Automated A type of UI History MSLogic
Storage Developer testing A type of
20
Test-Driven Development (TDD)
SUT
21
Test-Driven Development (TDD)
Write a failing test Write code to pass test
22
CityConnectTest.java CityConnect.java
23
CityConnectTest.java CityConnect.java
24
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
25
CityConnectTest.java CityConnect.java
Rule 1/3: Do not write functional code unless there is a failing test case.
26
CityConnectTest.java CityConnect.java
27
CityConnectTest.java CityConnect.java
Rule 2/3: Write minimal code to pass the test cases.
28
CityConnectTest.java CityConnect.java
Rule: No more test code than is necessary to fail.
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 CityConnect.java
42
CityConnectTest.java Note: more test cases required. CityConnect.java Refactor as necessary.
43
Test-Driven Development (TDD)
Write a failing test Write code to pass test
44
[Extra] who wants maximum publicity
When the system test fails... Do you want maximum publicity for your mistakes?
45
Must have automated developer tests!
46
It can save your reputation.
Must do developer testing Can do in TDD fashion Only system testing? NO Use automated test driver frameworks
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.