warning
DESCRIPTION
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 . - PowerPoint PPT PresentationTRANSCRIPT
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.
These slides contain a lot of animations. For optimal results, watch in slideshow mode.
How long will they take to catch all fish?a) Less than 1 hourb) Around 1 hourc) About 100 hoursd) Forever
fish {a|b|c|d}e.g. fish c 77577
If 100 people trying to catch 100 piranha fish in a lake. On average, one person can catch one fish within 1 hour
System testing
SUT
System testing
SUT
System testing
SUT
Do you want maximum publicity for your mistakes?
Do you want maximum publicity for your mistakes?
Never too early to test:
An Introduction to Early Developer Testing
CS2103/T, Lecture 4, Part 2, [Sep 6, 2013]
UI
MSLogic
Storage
Hist
ory
UI
MSLogic
Storage
Hist
ory
Unit testing
UI
MSLogic
Storage
Hist
ory
UI
MSLogic
Storage
Hist
ory
Unit testing
UI
MSLogic
Storage
Hist
ory
SUT
Unit testing
UI
MSLogic
Storage
Hist
ory
SUT
Unit testing
UI
MSLogic
Storage
Hist
ory
SUT
Stub
Stub
Test
Driv
er
Unit testing
UI
MSLogic
Storage
Hist
ory
SUT
Stub
Stub
Test
Driv
er
String getItem (int key){ if(key==1) return “Item for key 1”; if(key==2) return “Item for key 2”; …
Unit testing
UI
MSLogic
Storage
Hist
ory
SUT==MSLogic
Stub
Stub
Test
Driv
er
String item = msLogic.getItem(1);if(!item.equals(“Item1”) print(“Case 1 failed”);…
Unit testing
String item = msLogic.getItem(1);if(!item.equals(“Item1”) print(“Case 1 failed”);…
assertEquals(msLogic.getItem(1), “Item1”);…
Testing frameworks
Unit testing
UI
MSLogic
Storage
Hist
ory
Unit testing
UI
MSLogic
Storage
Hist
ory
Integration testing
UI
MSLogic
Storage
Hist
ory
Integration testing
UI
MSLogic
Storage
Hist
ory
Integration testing
UI
MSLogic
Storage
Hist
ory
Test-Driven Development (TDD)
SUT
Write a failing test
Write code to pass test
Test-Driven Development (TDD)
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
Clementi --- EunosEunos --- Novena
Clementi trueNovena trueEunos trueChangi false
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
CityConnect.java
CityConnectTest.java
Note: more test cases required.
Test-Driven Development (TDD)
Write a failing test
Write code to pass test
60+ developers
75,000 Lines of Code
Automated tests
When the system test fails...
Must have automated developer tests!
Only system testing? NO
It can save your career.
Automated test driver
frameworks
Can do in TDD fashion
Must do developer testing
↙ ?Should do this too
Everyone should do some
Use these
Do in CE2,Optional in project