I will answer what I can.
Should I re-test parent classes when testing child elements if no method has been overwritten?
You should fully test the parent and then only check what changes are in it.
If you have an optional parameter in a method, you should write a test for both when they are present and when not?
Yes, check everything that causes a change in behavior.
Should unit testing in any way fit with test code runtime or should it remain completely separate?
They must remain separate. Unit testing is the verification that a method does what it should. You have to check the execution time of the code at the system level, and then break it to find bottlenecks. Testing the performance of each individual unit will lead to premature optimization.
Is there a good reason not to run the full test suite every time?
If your test suite is huge and time consuming, you can only run a subset of it while you are still developing. You should run the whole package when you (think you did) to make sure that you havenโt broken anything.
Just because I understand my terminology correctly, what does a unit in unit testing refer to? Test class? Method? Parameter? Something else?
"Unit" refers to the test method. This is the smallest unit that makes sense to break software. A class method can use class B, but any test you write for this method should not worry. Just check this method.
Bill the Lizard Jan 23 '09 at 16:57 2009-01-23 16:57
source share