by codedokode · 4y ago · 0 comments
You start with listing requirements (what a program/a class/a function is expected to do or not to do) and then write tests that verify that it is indeed so.
The easiest thing is writing unit tests. Pick a function, define requiremens and write a test for every requirement. If your code is not very modular and it is difficult to isolate a class or a function in order to test it, then maybe you should refactor the code first.
No comments yet.