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, use android-latest-release. 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.
CtsTestLauncher
public
class
CtsTestLauncher
extends Object
implements
IBuildReceiver,
IConfigurationReceiver,
IDeviceTest,
IInvocationContextReceiver,
IMetricCollectorReceiver,
IRemoteTest,
IShardableTest
| java.lang.Object
|
| ↳ |
com.google.android.tradefed.testtype.CtsTestLauncher
|
A IRemoteTest for running tests against a separate CTS installation.
Launches an external java process to run the tests. Used for running a specific downloaded
version of CTS and its configuration It will use the current version of tradefed that launch it
to complete missing jars
Summary
Public constructors
CtsTestLauncher
public CtsTestLauncher ()
CtsTestLauncher
public CtsTestLauncher (int shardCount,
int shardIndex)
| Parameters |
shardCount |
int |
shardIndex |
int |
Public methods
buildClasspath
public String buildClasspath ()
Creates the classpath used by the sub process to run CTS
| Returns |
String |
A String with the full classpath. |
buildJavaCmd
public List<String> buildJavaCmd (String classpath)
Creates the java command line that will be run in a sub process.
| Parameters |
classpath |
String: java classpath to the jar files requires for CTS/XTS to run |
| Returns |
List<String> |
An ArrayList with the java command line and parameters. |
getConfigName
public String getConfigName ()
getDevice
public ITestDevice getDevice ()
Get the device under test.
setBuild
public void setBuild (IBuildInfo buildInfo)
| Parameters |
buildInfo |
IBuildInfo |
setConfigName
public void setConfigName (String config)
setConfiguration
public void setConfiguration (IConfiguration configuration)
Injects the IConfiguration in use.
| Parameters |
configuration |
IConfiguration |
setCtsVersion
public void setCtsVersion (int version)
setDevice
public void setDevice (ITestDevice device)
Inject the device under test.
setInvocationContext
public void setInvocationContext (IInvocationContext invocationContext)
| Parameters |
invocationContext |
IInvocationContext |
setMetricCollectors
public void setMetricCollectors (List<IMetricCollector> collectors)
Sets the list of IMetricCollectors defined for the test run.
| Parameters |
collectors |
List |
split
public Collection<IRemoteTest> split (int shardCountHint)
Alternative version of split() which also provides the shardCount that is attempted
to be run. This is useful for some test runner that cannot arbitrarily decide sometimes.
| Parameters |
shardCountHint |
int: the attempted shard count. |
| Returns |
Collection<IRemoteTest> |
a collection of subtests to be executed separately or null if test is
not currently shardable |
Protected methods
getRunUtil
protected IRunUtil getRunUtil ()
getSystemJava
protected String getSystemJava ()
setRunAsRoot
protected void setRunAsRoot (boolean runAsRoot)
| Parameters |
runAsRoot |
boolean |
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 2026-06-22 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 2026-06-22 UTC."],[],[]]