CtsTestLauncher

public class CtsTestLauncher
extends Object implements IBuildReceiver, IConfigurationReceiver, IDeviceTest, IInvocationContextReceiver, IMetricCollectorReceiver, IRemoteTest, IShardableTest

java.lang.Object
   ↳ com.google.android.tradefed.testtype.CtsTestLauncher


Ayrı bir CTS yüklemesine karşı test çalıştırmak için IRemoteTest.

Testleri çalıştırmak için harici bir Java işlemi başlatır. CTS'nin indirilen belirli bir sürümünü ve yapılandırmasını çalıştırmak için kullanılır. Eksik JAR'ları tamamlamak için, başlatıldığı sırada kullanılan Tradefed sürümünü kullanır.

Özet

Herkese açık oluşturucular

CtsTestLauncher()
CtsTestLauncher(int shardCount, int shardIndex)

Herkese açık yöntemler

String buildClasspath()

Alt işlem tarafından CTS'yi çalıştırmak için kullanılan sınıf yolunu oluşturur.

List<String> buildJavaCmd(String classpath)

Alt süreçte çalıştırılacak Java komut satırını oluşturur.

String getConfigName()
ITestDevice getDevice()

Test edilecek cihazı alın.

CommandResult getResult()
void run(TestInformation testInfo, ITestInvocationListener listener)

Testleri çalıştırır ve sonuçları dinleyiciye bildirir.

void setBuild(IBuildInfo buildInfo)

void setConfigName(String config)
void setConfiguration(IConfiguration configuration)

Kullanımdaki IConfiguration örneğini ekler.

void setCtsVersion(int version)
void setDevice(ITestDevice device)

Test edilen cihazı yerleştirin.

void setInvocationContext(IInvocationContext invocationContext)
void setMetricCollectors(List<IMetricCollector> collectors)

Test çalıştırması için tanımlanan IMetricCollector listesini ayarlar.

Collection<IRemoteTest> split(int shardCountHint)

Çalıştırılmaya çalışılan shardCount değerini de sağlayan split() öğesinin alternatif sürümü.

Korunan yöntemler

IRunUtil getRunUtil()
String getSystemJava()
void setRunAsRoot(boolean runAsRoot)

Herkese açık oluşturucular

CtsTestLauncher

public CtsTestLauncher ()

CtsTestLauncher

public CtsTestLauncher (int shardCount, 
                int shardIndex)

Parametreler
shardCount int

shardIndex int

Herkese açık yöntemler

buildClasspath

public String buildClasspath ()

Alt işlem tarafından CTS'yi çalıştırmak için kullanılan sınıf yolunu oluşturur.

İadeler
String Tam sınıf yolunu içeren bir dize.

Verdiği hatalar
IOException

buildJavaCmd

public List<String> buildJavaCmd (String classpath)

Alt işlemde çalıştırılacak Java komut satırını oluşturur.

Parametreler
classpath String: CTS/XTS'nin çalışması için gereken jar dosyalarının java sınıf yolu

İadeler
List<String> Java komut satırı ve parametrelerini içeren bir ArrayList .

Verdiği hatalar
DeviceNotAvailableException

getConfigName

public String getConfigName ()

İadeler
String

getDevice

public ITestDevice getDevice ()

Test edilecek cihazı alın.

İadeler
ITestDevice ITestDevice

getResult

public CommandResult getResult ()

İadeler
CommandResult

run

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

Testleri çalıştırır ve sonuçları dinleyiciye bildirir.

Parametreler
testInfo TestInformation: Testleri çalıştırmak için yararlı bilgiler içeren TestInformation nesnesi.

listener ITestInvocationListener: Test sonuçlarının ITestInvocationListener

Verdiği hatalar
DeviceNotAvailableException

setBuild

public void setBuild (IBuildInfo buildInfo)

Parametreler
buildInfo IBuildInfo

setConfigName

public void setConfigName (String config)

Parametreler
config String

setConfiguration

public void setConfiguration (IConfiguration configuration)

Kullanımdaki IConfiguration örneğini ekler.

Parametreler
configuration IConfiguration

setCtsVersion

public void setCtsVersion (int version)

Parametreler
version int

setDevice

public void setDevice (ITestDevice device)

Test edilen cihazı yerleştirin.

Parametreler
device ITestDevice: kullanılacak ITestDevice

setInvocationContext

public void setInvocationContext (IInvocationContext invocationContext)

Parametreler
invocationContext IInvocationContext

setMetricCollectors

public void setMetricCollectors (List<IMetricCollector> collectors)

Test çalıştırması için tanımlanan IMetricCollector listesini ayarlar.

Parametreler
collectors List

bölüşmek

public Collection<IRemoteTest> split (int shardCountHint)

Çalıştırılmaya çalışılan shardCount değerini de sağlayan split() öğesinin alternatif sürümü. Bu, bazen rastgele karar veremeyen bazı test çalıştırıcılar için yararlıdır.

Parametreler
shardCountHint int: denenmiş parça sayısı.

İadeler
Collection<IRemoteTest> ayrı ayrı yürütülecek bir alt test koleksiyonu veya test şu anda parçalanamıyorsa null

Korunan yöntemler

getRunUtil

protected IRunUtil getRunUtil ()

İadeler
IRunUtil

getSystemJava

protected String getSystemJava ()

İadeler
String

setRunAsRoot

protected void setRunAsRoot (boolean runAsRoot)

Parametreler
runAsRoot boolean