0
votes
0answers
17 views

Code Coverage Reporting with Visual Studio 2013 Professional for native C++ [migrated]

Using the C++ unit testing framework with Visual Studio 2013 Professional, one can write unit tests and run them from within the IDE, but in order to generate any coverage reports, apparently, one ...
4
votes
2answers
120 views

Is it ok to write “extra” unit tests?

My understanding of how TDD should work is that you write a failing test for the next bit of functionality you want to add to a function or object, code until the test passes and then write the next ...
-1
votes
1answer
124 views

Approach to cover all the cases in Unit Tests [duplicate]

I am new to Unit Testing and i am able to write them but my problem is I am not sure that I have covered everything in Unit Tests. What could be the approach for testing some functionality in a code?
2
votes
1answer
460 views

equals and hashcode methods autogenerated, is it always a good practice?

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

Best practice for code coverage of empty interface methods

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 ...
9
votes
10answers
903 views

Any tools/suggestions on how to refute code coverage quality argument

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 ...
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 ...
12
votes
2answers
509 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 ...
3
votes
3answers
365 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 ...
2
votes
2answers
236 views

Unit test and Code Coverage of Ant build scripts

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

How do you handle measuring Code Coverage in JavaScript

In order to measure Code Coverage for JavaScript unit tests, one needs to instrument the code, run the tests and then perform post-processing. My concern is that, as a result, you are unit testing ...
6
votes
4answers
404 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 ...
29
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. ...