Effective in 2026, to align with our trunk stable development model and ensure platform stability for the ecosystem, we will publish source code to AOSP in Q2 and Q4. For building and contributing to AOSP, we recommend utilizing android-latest-release instead of aosp-main. The android-latest-release manifest branch will always reference the most recent release pushed to AOSP. For more information, see Changes to AOSP.
Stay organized with collections
Save and categorize content based on your preferences.
ITestStorageClient
public
interface
ITestStorageClient
| com.google.android.tradefed.result.teststorage.ITestStorageClient
|
Known indirect subclasses
| Client |
Android Test storage client that uploads test results to the Test Storage service.
|
|
Interface for communicating with Android Test Storage backend. The interface contains methods to
create and update invocations and work units and upload test results. In order to create or
update work units or test results, they must belong to an invocation that was either created by
this client or the invocation must be added using addInvocation method.
Summary
Public methods |
abstract
Invocation
|
createInvocation(Invocation invocation)
Creates an invocation in Test Storage using the data in the provided invocation.
|
abstract
Build
|
createLocalBuild(Build localBuild)
Insert a local build in the backend.
|
abstract
WorkUnit
|
createWorkUnit(WorkUnit workUnit)
Creates a work unit in Test Storage.
|
abstract
ImmutableList<WorkUnit>
|
createWorkUnits( workUnits)
Creates all work units in a provided list in TestStorage.
|
abstract
File
|
fetchTestArtifact(String invocationId, String resourceId)
Fetches and return the actually test artifact file requested.
|
abstract
void
|
finalizeTestResults()
Waits until all test results are uploaded.
|
abstract
Invocation
|
getInvocation(String invocationId)
Returns an invocation that has the provided invocation id.
|
abstract
BuildArtifactMetadata
|
getTestArtifact(String invocationId, String resourceId)
Returns a test artifact matching provided invocation and resource id.
|
abstract
WorkUnit
|
getWorkUnit(String workUnitId)
Returns a workunit matching the provided id.
|
abstract
TestArtifactListResponse
|
listTestArtifact(String invocationId, String artifactType)
Searches and list all test artifacts matching the type provided.
|
abstract
Invocation
|
updateInvocation(Invocation invocation)
Updates an invocation in Test Storage using the data in the provided invocation.
|
abstract
BuildArtifactMetadata
|
updateTestArtifact(String invocationId, String workUnitId, String testResultId, BuildArtifactMetadata artifact, long legacyId)
Updates the provided artifact.
|
abstract
BuildArtifactMetadata
|
updateTestArtifact(BuildArtifactMetadata artifact, long legacyId, AbstractInputStreamContent content)
Updates the provided artifact and uploads provided content.
|
abstract
WorkUnit
|
updateWorkUnit(WorkUnit workUnit)
Updates a provided work unit in Test Storage.
|
abstract
void
|
uploadAssociations( associations, int poolSize)
Uploads associations between logs and tests/work units.
|
abstract
void
|
uploadResult(TestResult result)
Upload provided test result to Test Storage.
|
Public methods
createInvocation
public abstract Invocation createInvocation (Invocation invocation)
Creates an invocation in Test Storage using the data in the provided invocation.
| Parameters |
invocation |
Invocation: - describes the invocation to be created. |
| Returns |
Invocation |
invocation that was created in Test Storage. |
createLocalBuild
public abstract Build createLocalBuild (Build localBuild)
Insert a local build in the backend.
| Parameters |
localBuild |
Build: description of the local build |
createWorkUnit
public abstract WorkUnit createWorkUnit (WorkUnit workUnit)
Creates a work unit in Test Storage.
| Parameters |
workUnit |
WorkUnit: - describes the work unit to create. |
| Returns |
WorkUnit |
a new work unit. |
createWorkUnits
public abstract ImmutableList<WorkUnit> createWorkUnits ( workUnits)
Creates all work units in a provided list in TestStorage.
| Parameters |
workUnits |
: - list of work units to create. |
| Returns |
ImmutableList<WorkUnit> |
a list of workunits that were created. |
fetchTestArtifact
public abstract File fetchTestArtifact (String invocationId,
String resourceId)
Fetches and return the actually test artifact file requested.
| Parameters |
invocationId |
String |
resourceId |
String |
finalizeTestResults
public abstract void finalizeTestResults ()
Waits until all test results are uploaded.
getInvocation
public abstract Invocation getInvocation (String invocationId)
Returns an invocation that has the provided invocation id.
| Parameters |
invocationId |
String: - id of the invocation to return. |
| Throws |
|
- if the provided invocation is not found or if there is an error
communicating with the back end. |
getTestArtifact
public abstract BuildArtifactMetadata getTestArtifact (String invocationId,
String resourceId)
Returns a test artifact matching provided invocation and resource id.
| Parameters |
invocationId |
String |
resourceId |
String |
| Returns |
BuildArtifactMetadata |
|
getWorkUnit
public abstract WorkUnit getWorkUnit (String workUnitId)
Returns a workunit matching the provided id.
| Parameters |
workUnitId |
String: - id of the work unit. |
| Throws |
|
- if the provided work unit is not found or there is an error
communicating with backend services. |
listTestArtifact
public abstract TestArtifactListResponse listTestArtifact (String invocationId,
String artifactType)
Searches and list all test artifacts matching the type provided.
| Parameters |
invocationId |
String |
artifactType |
String |
| Returns |
TestArtifactListResponse |
|
updateInvocation
public abstract Invocation updateInvocation (Invocation invocation)
Updates an invocation in Test Storage using the data in the provided invocation.
| Parameters |
invocation |
Invocation: - invocation with updated data. |
| Returns |
Invocation |
an updated invocation. |
public abstract BuildArtifactMetadata updateTestArtifact (String invocationId,
String workUnitId,
String testResultId,
BuildArtifactMetadata artifact,
long legacyId)
Updates the provided artifact. This method only updates the association and does not modify
the content. When calling this method provide the original invocation id, work unit id, and
test result id as the arguments. Put the new work unit, and test result id in the
BuildArtifactMetadata object. When work unit id and/or test resutlt as not used in the
association they should be set to empty string ("").
| Parameters |
invocationId |
String |
workUnitId |
String |
testResultId |
String |
artifact |
BuildArtifactMetadata |
legacyId |
long |
| Returns |
BuildArtifactMetadata |
|
updateTestArtifact
public abstract BuildArtifactMetadata updateTestArtifact (BuildArtifactMetadata artifact,
long legacyId,
AbstractInputStreamContent content)
Updates the provided artifact and uploads provided content. When uploading content, it is not
possible to update association data. Do not modify the work unit id and test result id
already set in the BuildArtifactMetadata argument.
| Parameters |
artifact |
BuildArtifactMetadata |
legacyId |
long |
content |
AbstractInputStreamContent |
| Returns |
BuildArtifactMetadata |
|
updateWorkUnit
public abstract WorkUnit updateWorkUnit (WorkUnit workUnit)
Updates a provided work unit in Test Storage.
| Parameters |
workUnit |
WorkUnit: - work unit to update. |
| Returns |
WorkUnit |
updated work unit. |
uploadAssociations
public abstract void uploadAssociations ( associations,
int poolSize)
Uploads associations between logs and tests/work units. Associations allow Android Test
Storage to keep track of which test produced a log.
| Parameters |
associations |
: a list of log files and their associations. |
poolSize |
int: The size of the worker pool used to parallel upload. 0 for no parallel
upload. |
uploadResult
public abstract void uploadResult (TestResult result)
Upload provided test result to Test Storage. Test result must be part of a previously created
invocation.
| Parameters |
result |
TestResult: - result to upload. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-12-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-12-04 UTC."],[],[]]