JacocoCodeCoverageTest

public class JacocoCodeCoverageTest
extends CodeCoverageTestBase<JacocoCodeCoverageReportFormat>

java.lang.Object
   ↳ com.android.tradefed.testtype.CodeCoverageTestBase<com.android.tradefed.testtype.JacocoCodeCoverageReportFormat>
     ↳ com.android.tradefed.testtype.JacocoCodeCoverageTest


An IRemoteTest that generates a code coverage report by generating build.xml on the fly and executing the ant command. This test type supports collecting coverage information from classes that have already been instrumented by the Jacoco compiler.

Summary

Public constructors

JacocoCodeCoverageTest()

Protected methods

File generateCoverageReport(Collection<File> executionFiles, JacocoCodeCoverageReportFormat format)

Generates a human-readable coverage report from the given execution data.

List<JacocoCodeCoverageReportFormat> getReportFormat()

Returns the list of output formats to use when generating the coverage report.

Public constructors

JacocoCodeCoverageTest

JacocoCodeCoverageTest ()

Protected methods

generateCoverageReport

File generateCoverageReport (Collection<File> executionFiles, 
                JacocoCodeCoverageReportFormat format)

Generates a human-readable coverage report from the given execution data. This method is called after all of the tests have finished running.

Parameters
executionFiles Collection: The execution data files collected while running the tests.

format JacocoCodeCoverageReportFormat: The output format of the generated coverage report.

Returns
File

Throws
IOException

getReportFormat

List<JacocoCodeCoverageReportFormat> getReportFormat ()

Returns the list of output formats to use when generating the coverage report.

Returns
List<JacocoCodeCoverageReportFormat>