-
THE INS AND OUTS OF UNIT TESTING A BLACK BOX
A unit test sees the System Under Test (SUT) as a black box. That means that it doesn’t matter what the code inside the class or function looks like, it only matters how it manipulates the data. And the way you judge that is only by the data that goes in and out of the function. Never ever ever by looking at the code. There are four ways that you send and receive data with. 1. The in-parameters of the function you are testing. 2. The return value from the function you are testing. 3. The parameters that are used in internal calls to functions outside your SUT. The data…
-
TEST DRIVEN DEVELOPMENT
History We’ve all heard of waterfall development, you know, first we make plan, then we do the architecture, when that is done, we start coding, after that we test and fix bugs, and lastly, we deliver. And then the clients are not happy with what they got 🙂 The problem with this is that the users will have to wait until the entire project is finished before they can see if it is what they wanted. And the same goes for us developers. We have to wait until we’re finished, then the testers are finished, before we are told if there are any bugs. And even longer before the users…