代码覆盖率检测工具大全
这是我见到的一个搜集代码覆盖率工具最全的网站:http://c2.com/cgi/wiki?CodeCoverageTools
for Java:
- EMMA @ http://emma.sourceforge.net/ - OpenSource, instrumenting ClassLoader as well as offline instrumentor, ANT, fractional line coverage, block coverage
- Hansel @ http://hansel.sourceforge.net/ - OpenSource, instruments classes in ClassLoader, integrates with JavaUnit
- jcoverage @ http://www.jcoverage.com/ - OpenSource and ClosedSource versions, Ant task, line and branch coverage
- Cobertura @ http://cobertura.sourceforge.net/ - OpenSource, free, instruments class files, Ant tasks
- Clover @ http://www.cenqua.com/clover/ - ClosedSource (but free for use on OpenSource projects), integrates well with common Java IDEs
- GroboUtils @ http://groboutils.sourceforge.net - OpenSource, instruments class files, Ant tasks
- NoUnit @ http://nounit.sourceforge.net/ - OpenSource (GNU)
- Quilt @ http://quilt.sourceforge.net/ - OpenSource, JavaUnit, Ant, instrumenting ClassLoader
- Gretel @ http://sourceforge.net/projects/gretel - [old version of Hansel?]
- The "Java Test Coverage Tool" @ http://www.semanticdesigns.com/Products/TestCoverage/JavaTestCoverage.html - ClosedSource, Instruments Source, displays results superimposed on browsable source. US$200 as of 8/1/2004.
- JBlanket (Software Information) @ http://csdl.ics.hawaii.edu/Tools/JBlanket/ - a tool for assessing and improving method coverage of unit test cases. It is integrated with JUnit and Ant.
MutationTesting: (which isn't really CodeCoverage, but it's related)
- JesTer @ http://jester.sourceforge.net/ - changes your code, and then runs your tests. (If arbitrary changes to the code don't break the tests, then is your code sufficiently tested?)
for .NET (DotNet):
- OpenCover @ https://github.com/sawilde/opencover - OpenSource (MIT licence) A code coverage tool for .NET 2 and above, support for 32 and 64 processes with both branch and sequence points
- Clover.NET @ http://www.cenqua.com/clover.net/ - ClosedSource (but free for use on OpenSource projects), C# and VB.NET, statement, method and branch coverage, from command line, Visual Studio, and NAnt (preliminary mono support)
- NCover @ http://ncover.sourceforge.net/ - OpenSource, path coverage, NUnit, NAnt
- CoverageEye?.NET @ http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=881a36c6-6f45-4485-a94e-060130687151 - uses a COM component to leverage the .NET profiling API
- "DevPartner? Studio Professional Edition" @ http://www.compuware.com/products/devpartner/1563_ENG_HTML.htm - $$$
- "Perform Code Coverage Analysis with .NET to Ensure Thorough Application Testing", an MSDN article on building "A custom code coverage tool" @http://msdn.microsoft.com/msdnmag/issues/04/04/CodeCoverageAnalysis/default.aspx
- "C# Test Coverage Tool" @ http://www.semanticdesigns.com/Products/TestCoverage/CSharpTestCoverage.html - ClosedSource. Instruments Source, displays results superimposed on browsable source. US$250 as of 8/1/2004.
- "dotCover" http://www.jetbrains.com/dotcover/ Closed source, free license for OSS projects
C/C++:
- tcov = Sun Unix C profiler. See "tcov(1)" man page. It annotates (mangles) your source code to add instrumentation.
- gcov = GNU C/C++ equivalent of "tcov".
- Dynamic Code Coverage for Sun Solaris, Linux, and HP UX @ http://www.dynamic-memory.com/
- "C Test Coverage Tool" @ http://www.semanticdesigns.com/Products/TestCoverage/CTestCoverage.html - ClosedSource. Instruments Source, displays results superimposed on browsable source. US$400 as of 8/1/2004. ANSI, Microsoft Visual6 C, and GNU C dialects all supported.
- "C++ Test Coverage Tool" @ http://www.semanticdesigns.com/Products/TestCoverage/CppTestCoverage.html - ClosedSource. Instruments Source, displays results superimposed on browsable source. US$500 as of 8/1/2004. ANSI and Microsoft Visual6 C++ dialects all supported.
Perl:
- Devel::Cover @ http://search.cpan.org/dist/Devel-Cover/ - Statement, branch, path, expression and documentation coverage.
- Pod::Coverage @ http://search.cpan.org/dist/Pod-Coverage / - Documentation coverage (used by Devel::Cover)
- Test::Pod::Coverage @ http://search.cpan.org/dist/Test-Pod-Coverage - Testing framework wrapped around Pod::Coverage
- Devel::Coverage - older coverage module superseded by Devel::Cover
for Python:
- coverage.py @ http://www.ravenbrook.com/project/p4dti/master/test/coverage.py - Provides statement coverage data. Part of a larger project: OpenSource-style license is at bottom of source file.
- pylid - http://www.nullcube.com/software/pylid.html
- trace.py (part of Python's standard library)
for PHP:
- "PHP Test Coverage Tool" @ http://www.semanticdesigns.com/Products/TestCoverage/PHPTestCoverage.html - ClosedSource. Instruments Source, displays results superimposed on browsable source. PHP4 and PHP5 versions.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义