JackCodeCoverageTest

public class JackCodeCoverageTest
extends CodeCoverageTestBase<JackCodeCoverageReportFormat>

java.lang.Object
   ↳ com.android.tradefed.testtype.CodeCoverageTestBase<com.android.tradefed.testtype.JackCodeCoverageReportFormat>
     ↳ com.android.tradefed.testtype.JackCodeCoverageTest


An IRemoteTest which runs installed instrumentation test(s) and generates a code coverage report. This test type supports collecting coverage information from classes that have already been instrumented by the Jack compiler.

Summary

Public constructors

JackCodeCoverageTest()

Protected methods

void cleanup()

Cleans up any resources allocated during a test run.

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

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

File getCoverageReporter()

Returns the location of the report generation tool.

Set<File> getMetadataFiles()

Returns the set of metadata files that should be used to generate the coverage report.

List<String> getMetadataFilesFilter()

Returns the list of glob patterns used to select metadata files to use when generating the coverage report.

String getMetadataZipArtifact()

Returns the name of the build artifact that contains the coverage metadata.

List<JackCodeCoverageReportFormat> getReportFormat()

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

long getReportTimeout()

Returns the maximum time to wait for the coverage report to be generated.

Public constructors

JackCodeCoverageTest

JackCodeCoverageTest ()

Protected methods

cleanup

void cleanup ()

Cleans up any resources allocated during a test run. Called at the end of the run(ITestInvocationListener) after all coverage reports have been logged. This method is a stub, but can be overridden by subclasses as necessary.

generateCoverageReport

File generateCoverageReport (Collection<File> executionFiles, 
                JackCodeCoverageReportFormat 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 JackCodeCoverageReportFormat: The output format of the generated coverage report.
Returns
File
Throws
IOException

getCoverageReporter

File getCoverageReporter ()

Returns the location of the report generation tool.

Returns
File
Throws
IOException

getMetadataFiles

Set<File> getMetadataFiles ()

Returns the set of metadata files that should be used to generate the coverage report.

Returns
Set<File> The set of metadata files that match at least one of the metadata-files-filters.
Throws
IOException

getMetadataFilesFilter

List<String> getMetadataFilesFilter ()

Returns the list of glob patterns used to select metadata files to use when generating the coverage report. Exposed for unit testing.

Returns
List<String>

getMetadataZipArtifact

String getMetadataZipArtifact ()

Returns the name of the build artifact that contains the coverage metadata.

Returns
String

getReportFormat

List<JackCodeCoverageReportFormat> getReportFormat ()

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

Returns
List<JackCodeCoverageReportFormat>

getReportTimeout

long getReportTimeout ()

Returns the maximum time to wait for the coverage report to be generated.

Returns
long