5. SPRINT3R
Siam Chamnankit Co., Ltd., Odd-e (Thailand) Co., Ltd. and Alliance
Why not write Unit test ?
5
Testing for QA Time = Cost
Integration testing find more bugs
Manual testing find more bugs
Write more code
11. SPRINT3R
Siam Chamnankit Co., Ltd., Odd-e (Thailand) Co., Ltd. and Alliance
“What ’s in a name ?”
That which we call a rose
by any other name would smell
Romeo and Juliet
as sweet
11
12. SPRINT3R
Siam Chamnankit Co., Ltd., Odd-e (Thailand) Co., Ltd. and Alliance
Don’t say “test”, say “should”
Guide to Test Writing
12
15. SPRINT3R
Siam Chamnankit Co., Ltd., Odd-e (Thailand) Co., Ltd. and Alliance
Don’t test your class, test behaviour
Guide to Test Writing
15
16. SPRINT3R
Siam Chamnankit Co., Ltd., Odd-e (Thailand) Co., Ltd. and Alliance
Test class names are important too
Structure your test well
Guide to Test Writing
16
Tests are deliverable too
18. SPRINT3R
Siam Chamnankit Co., Ltd., Odd-e (Thailand) Co., Ltd. and Alliance
The ratio of time spent (code)
versus writing is
over 10 to 1
Robert C. Martin, Clean Code
18
30. SPRINT3R
Siam Chamnankit Co., Ltd., Odd-e (Thailand) Co., Ltd. and Alliance
Data-Driven with JUnit
30
@Parameterized
31. SPRINT3R
Siam Chamnankit Co., Ltd., Odd-e (Thailand) Co., Ltd. and Alliance
Set of test data
Using parameterized
31
Expected result
Define test that uses the test data
Verify result against expected result
33. SPRINT3R
Siam Chamnankit Co., Ltd., Odd-e (Thailand) Co., Ltd. and Alliance
@Parameterized
with Calculate Grade
Demo
33
Input Expected Result
80 A
70 B
60 C
50 D
40 F
34. SPRINT3R
Siam Chamnankit Co., Ltd., Odd-e (Thailand) Co., Ltd. and Alliance
Step 1 :: Test Data
34
Input Expected Result
80 A
70 B
60 C
50 D
40 F