The tag has no wiki summary.

learn more… | top users | synonyms

26
votes
7answers
4k views

What should you test with unit tests?

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. ...
11
votes
7answers
882 views

Is test coverage an adequate measure of code quality?

If I have some code that has 80% test coverage (all tests pass), is it fair to say that it's of higher quality than code with no test coverage? Or is it fair to say it's more maintainable?
6
votes
4answers
397 views

Unit testing internal components

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 ...
12
votes
2answers
478 views

How do I know if I have enough unit test coverage to remove an integration test?

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 ...
4
votes
5answers
2k views

Is path coverage stronger than condition coverage?

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 ...
3
votes
3answers
357 views

Is unconditional code considered a branch?

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 ...