Preamble: Let's say I aim to cover all my classes with test coverage. Despite the common opinion (expecially in Java community) to "not pay too much attention to Cyclomatic Complexity (CC) and code ...
Given a class that implements an interface, but does not need all of the methods implemented, what is the best practice for unit testing this class with respect to code coverage? - or is it considered ...
Now I know people could consider this question duplicate or asked many times, in which case I would appreciate a link to relevant questions with answer to my question. I have been recently in ...
I have encountered (even in literature) two contradicting opinions related to path vs condition coverage (not branch or edge!). Some say Path coverage is stronger than the condition coverage, some say ...
I'm working on a legacy system (by that I mean it was written without tests). We've tried to test some of the system by writing integration tests that test functionality from the outside. This ...
Having simple code like this: int A=5; object X=Console.ReadLine() if(Condition) DoSomething(); else DoStuff(); DoSomethingElse(); Some sources say there are actually 4 branches: First ...
In our development environment We have more and more build scripts for ant to perform the build tasks for several different build jobs. These build scripts sometimes become large and do a lot of ...
Currently, I am working on a very complex product. Unit testing is something unknown to this product till date. Hence the code base is too complex to keep it compatible with unit tests. I am supposed ...
To what extent do you unit test internal/private components of a class/module/package/etc? Do you test them at all or do you just test the interface to the outside world? An example of these internal ...
I'm freshly out of college, and starting university somewhere next week. We've seen unit tests, but we kinda not used them much; and everyone talks about them, so I figured maybe I should do some. ...