Coverage Tool)

Source: Internet
Author: User
Tags gcov

Coverage Tool)
Java:
EMMA: advantages: 1. Open-source software; 2. Support for ant tasks; Emma is open-source and has little impact on application execution speed.
Disadvantage: The parameter setting of 1 ant task is weak, and the coverage parameter needs to append the configuration file.
Emma is a free and open-source Java code coverage testing tool. It is written in 100% pure Java and does not depend on any third-party libraries. Unlike other code coverage testing tools, Emma supports the development of large project teams and each developer can benefit from it.
Emma enhances the class file to test coverage. It provides offline and fly modes. In fly mode, Emma does not change the compiled class file, the class file is enhanced only when it is loaded by classloader. [AOP technology]
Emma supports coverage tests for classes, methods, code lines, and basic branch statements, and provides reports in multiple formats, including plain text, HTML, and XML, all reports can be configured in detail to obtain customized reports.
When using Emma, you can perform coverage tests without obtaining the source code. In addition, Emma supports testing the entire jar file.
Emma provides ant integration by default. Emma can also support Maven and eclipse through extension.

Eclemma:
The emergence of eclemma makes up for a big regret for Emma users-lack of graphical interfaces and support for integrated development environments. Combining eclipse and Emma, the two best tools in their respective fields, is what eclemma provides for us. Next, let's take a look at what eclemma provides to developers in subsequent chapters.

Cobertura:
Advantages: 1 open source software; 2 support for Marven
Disadvantages: 1 can be customized parameters too little, UTF-8 encoding file, directly hanging out, from the output of the file, or to XML, HTML generation.
Http://www.ibm.com/developerworks/cn/java/j-lo-eclemma/index.html coverage testing with eclemma
May 10, 2007; Level: Junior; Ganzhi (ganzhi@cn.ibm.com), software engineer, IBM China software development center laboratory
Coverage testing is an important indicator to measure the testing quality. Can we have a certain degree of confidence in the quality of a software product after a wide range of tests, such as unit testing, assembly testing, integration testing, and acceptance testing? This requires us to examine the quality of the test. If the test only covers a small part of the code, no matter how many test cases we write, we cannot believe that the software quality is guaranteed. On the contrary, if testing covers the vast majority of software code, we can have a reasonable confidence in the quality of the software. This article will introduce eclemma, an excellent open-source software testing tool, which can conduct coverage tests on programs written in Java, so as to generate a detailed coverage test report on the results of program running.

======================================

Linux + C/C ++ GCC:

Gcov/lcov:
Http://ggcov.sourceforge.net

Http://blog.csdn.net/livelylittlefish/article/details/6321861
Http://blog.csdn.net/livelylittlefish/article/details/6321887

1. What is gcov?

Gcov is GCC coverage

Is a tool for testing code coverage.

Is a command-line console Program

With the release of GCC, GCC is used to test the statement coverage and branch coverage of C/C ++ files;
Working with profiling tool (such as GPROF), you can estimate which code in the program is the most time-consuming;
Note: The program summary analysis tool is used to analyze code performance.

 
2. What can gcov do?

Gcov statistics

Execution frequency of each line of code

Actually, which code has been executed?

Time consumed by each section code (execution time)
Therefore, gcov can help you optimize the code. Of course, this optimization action should still be completed by developers.

1. What is lcov?

Gcov graphical front-end tool
Is an open-source tool maintained by Linux test project. It was initially designed to support measurement of Linux kernel coverage.
Generate a complete HTML tree based on HTML output
The output includes an overview, coverage percentage, and charts, allowing you to quickly browse coverage data.
Supports large projects and provides three levels of views: Directory view, file view, and source code view.

======================================

Introduction to Python code override tool coverage. py (http://nedbatchelder.com/code/coverage)

Http://magustest.com/blog/whiteboxtesting/python-coverage-py/

======================================
Javascript:
Javascript test coverage detection tool jscoverage

======================================
PHP:
Phpunit is a lightweight PHP testing framework. It is a full migration of the junit3 series under PhP5 and a member of the xunit testing framework family (both of them are based on the pattern pioneer Kent Beck's design ).
Unit testing is the basis of several modern agile development methods, making phpunit a key tool for many large PHP projects.
This tool can also be used by the xdebug extension to generate code coverage reports, and can be integrated with phing for automatic testing. Finally, it can be integrated with selenium to complete large-scale automated integration testing.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.