Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

I have a wishlist for code coverage tools and am wondering if people could recommend some tools that fulfill all or many of my wishes. I am starting my search for tools that work specifically with .net code, but will also need a tool for Java code as well, so recommendations for either would be appreciated.

  1. Integration with my continuous integration tool - TeamCity to run during unit test execution.
  2. Run against a deployed service or web service to track coverage during execution of automated and/or manual tests.
  3. Ability to merge results from multiple runs - I want to see combined coverage from all tests and then split it up to see results from unit tests vs functional automation vs manual regression.
  4. Ability to show coverage for specific executed tests.

I am currently evaluating NCover 4.0 for .net which is very promising, but can be expensive to license. I wanted to do a fair comparison to other tools before investing in the cost of NCover.

share|improve this question
add comment

6 Answers

If price is an issue, you can use ncover 1.5, which is still open source on sourceforge. Another option is coverity test advisor.

share|improve this answer
add comment

Visual Studio 2012 has a pretty good code coverage tool. I have used it to measure code coverage of a web service.

It is easy to integrate into build systems, you have out of the box support for TeamBuild (the TFS build) - see a more detailed article here.

According to msdn it has result merging.

Code coverage is also integrated in Microsoft Test Manager, so you can have manual testers do a round of testing on your service and at the end see how much of the code they actually hit.

share|improve this answer
add comment

Can't help with .net as I mainly have experience at a java shop. We use a combo of sonar and Jacoco.

Check out Jacoco!

I just installed it on the machines where we execute our service tests and the reports it generates are nice and can be integrated into CI easily (using ant). It's actively worked on, and has a Maven plug-in. The coolest feature for me is using the java agent to monitor lines of code used during testing. Also has a feature to combine reports. So you could, in theory, take unit, service, and regression testing coverage reports and combine them together (pretty damn cool).

I think that covers all your requirements, but of course not .net...

share|improve this answer
    
Awesome, I'll definitely check this out when I get to the Java side! –  Sam Woods May 6 '13 at 17:18
add comment

Look at Sonar: http://www.sonarsource.org

it is pretty good for any static test methods. Perfect for Java (plenty of metrics and plugins) okay for .NET (many metrics).

share|improve this answer
add comment

Our family of test coverage tools satisfy directly your requirements 2/3/4 and your interest in tools that cover C# as well as Java (and several other languages). The tools are scriptable, so integrating into TeamCity should be straightforward, but they don't do that out of the box.

share|improve this answer
add comment

Dot net's build in Unit test and NUnit can resolve all of your needs...and for Java, Junit is the best . You may choose TestNG.

share|improve this answer
    
Can you expand your answer? How do mstest, nunit and junit resolve my needs for code coverage? –  Sam Woods Apr 30 '13 at 19:33
    
Actually Unit tests can test your codes before building any solution and you can cover code coverage (along with decision coverage). I thought of code coverage as tested code. –  Shantonu Apr 30 '13 at 19:50
    
Still not clear to me how your answer relates to Sam's question? –  testerab Apr 30 '13 at 21:30
3  
@Shantonu I think Sam was asking about tools that measure how much of the code under test is executed. The packages you described are frameworks for organizing and executing automated tests. To see the difference, try comparing ncover.com to nunit.org. –  user246 Apr 30 '13 at 22:08
    
I think one of the key issues here is explaining how it relates instead of just listing them. For example, there may be some JUnit or NUnit plugin that you can use to get what you want, but without that extra knowledge it isn't as useful. –  corsiKa May 5 '13 at 23:28
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.