- 1. Unit testing in practice Part I
2. Let's start 3. Unit test
- What kind of monster is this?
4. Unit testing- What kind of monster is this ?
- Programmers write code. The code is always unique.
- The code is designed to solve problems.
- The purpose of the code is to do it well.
5.
- Programmers write code. The code is always unique.
- The code is designed to solve problems.
- The purpose of the code is to do it well.
Unit testing- What kind of monster is this ? 6.
- Programmers write code. The code is always unique.
- The code is designed to solve problems
- The purpose of the code is to do it well.
Unit testing- What kind of monster is this ? 7.
- Programmers write code. The code is always unique.
- The code is designed to solve problems
- The purpose of the code is to do it well.
Unit testing- What kind of monster is this ? 8. Unit testing-
What kind of monster is this ? 9. Unit testing- What kind of
monster is this ? 10.
- NEW DETAIL -> TEST BENCH -> TESTING -> PILOT ->
...
Unit testing- What kind of monster is this ? 11.
Unit testing- What kind of monster is this ? 12.
Why is this happening? Unit testing- What kind of monster is
this ? 13.
Why does this happen?
Unit testing- What kind of monster is this ? 14.
UNIT TESTING Unit testing- What kind of monster is this ?
15.
Unit testing -What kind of monster? 16. Unit testing -What's the
point?
17. Unit testing -What's the point?
18. Unit testing -What's the point?
- Writing simple testsfor each method of class
19. Unit testing -What's the point?
20. Unit testing -What's the point?
- Write code and protect...
- If the code is broken, we will know.
21. Unit testing -What's the point?
- We are not afraid to change the code
- We are not afraid that you will break any other code
- We are not afraid thatothersbroke any your code
22. Unit testing -What's the point?
- We are not afraid to change the code
- We are not afraid that you will break any other code
- We are not afraid thatothersbreak any of your code
23. Unit testing -What's the point?
- We are not afraid to change the code
- We are not afraid that you will break any other code
- We are not afraid thatothersbreak any of your code
24. Unit testing -What's the point?
- We are not afraid to change the code
- We are not afraid that you will break any other code
- We are not afraid thatothersbreak any of your code
25. Unit testing - Who needs it?
26. Unit testing - Who needs it?
- Maybe not need programmers?
27. Unit testing -what is the purpose?
Edsger W. Dijkstra 28. Unit testing -what is the purpose?
29. Unit testing -what is the purpose?
- Our code has bugs.Butnot only bugs....
30. Unit testing -what is the purpose?
- Yes, our code hasbugs ...butnot only bugs.
31. Unit testing -what is the purpose?
- Yes, our code hasbugs ...butnot only bugs.
32. Unit testing -what is the purpose?
- Yes, our code hasbugs ...butnot only bugs.
33. Unit testing -what is the purpose?
- Yes, our code hasbugs ...butnot only bugs.
34. Unit testing -what is the purpose?
- Yes, our code hasbugs ...butnot only bugs.
35. We all have heard that unit tests:
-
- reduce bugs in new features
-
- reduce bugs in existing features
-
- reduce the cost of change
-
- force you to "slow down and think"
-
- make development fun and faster
36. So what is the problem? 37. So what is the problem?
- We dont have time to write tests.
- We have to code new features instead.
38. Why is this happening?
-
- You have broken someone's code,
39. Why is this happening?
- There are many "reasons" not to use the unit - testing.
40. And all because
- I dont have time to learn how to do it well.
- I dont have time to learn how to do it.
- I don't have time to learn.
- I want to writeREAL CODE NOW!
41. Developers think...
- - I do not make mistakes in code
- + Please, visithttp://www.rpnc.lv
- - I have complicated code
- - Writing unit tests is unnecessary complexity
42. Management thinks...
- - We have testers to find bugs
- - Unit tests are a waste of time (expensive)
43. Management thinks...
- - We have testers to find bugs
- - Unit tests are a waste of time (expensive)
44. Unit Tests and You
- Pick a testing framework (xUnit)
- Catch yours and colleagues bugs
45. About me
- past: more 20 years IT experience
- how to find: [email_address]