public class

TestEventClientArgs.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.test.internal.events.client.TestEventClientArgs.Builder

Overview

Creates a new TestEventClientArgs instance using the provided arguments. Use the applicable setters to configure the arguments then call TestEventClientArgs.Builder.build() to create the new TestEventClientArgs.

Summary

Constructors
publicBuilder()

Methods
public TestEventClientArgsbuild()

Determines which operation to perform (test discovery, or test run event notifications) by evaluating the provided arguments.

public TestEventClientArgs.BuildersetConnectionFactory(TestEventClientArgs.ConnectionFactory connectionFactory)

If a custom connectionFactory instance is provided, then TestEventClient will use this factory to create the TestEventServiceConnection.

public TestEventClientArgs.BuildersetOrchestratorService(java.lang.String orchestratorService)

If any non-empty value is present, then use Orchestrator v1 (androidx.test.orchestrator.OrchestratorService) for test discovery or test run event notifications.

public TestEventClientArgs.BuildersetPrimaryInstProcess(boolean isPrimaryInstProcess)

Indicates whether this is the primary instrumentation process, as returned by MonitoringInstrumentation.isPrimaryInstrProcess(RunnerArgs).

public TestEventClientArgs.BuildersetTestDiscoveryRequested(boolean discoveryRequested)

Discover all available tests and send them back to the Orchestrator.

public TestEventClientArgs.BuildersetTestDiscoveryService(java.lang.String testDiscoveryService)

Discover available tests and send TestDiscoveryEvents back to the Orchestrator v2 androidx.test.services.events.discovery.ITestDiscoveryEvent service.

public TestEventClientArgs.BuildersetTestPlatformMigration(boolean testPlatformMigration)

Temporary workaround - should this use the new test platform event client

public TestEventClientArgs.BuildersetTestRunEventService(java.lang.String testRunEventService)

Send TestRunEvents back to the Orchestrator v2 androidx.test.services.events.run.ITestRunEvent service.

public TestEventClientArgs.BuildersetTestRunEventsRequested(boolean runEventsRequested)

Send test run status updates to the Orchestrator.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Methods

public TestEventClientArgs.Builder setPrimaryInstProcess(boolean isPrimaryInstProcess)

Indicates whether this is the primary instrumentation process, as returned by MonitoringInstrumentation.isPrimaryInstrProcess(RunnerArgs).

public TestEventClientArgs.Builder setOrchestratorService(java.lang.String orchestratorService)

If any non-empty value is present, then use Orchestrator v1 (androidx.test.orchestrator.OrchestratorService) for test discovery or test run event notifications. The actual value of TestEventClientArgs.Builder.orchestratorService isn't used.

Requires one of TestEventClientArgs.Builder.testDiscoveryRequested or TestEventClientArgs.Builder.testRunEventsRequested to be set to true.

public TestEventClientArgs.Builder setTestDiscoveryRequested(boolean discoveryRequested)

Discover all available tests and send them back to the Orchestrator.

public TestEventClientArgs.Builder setTestRunEventsRequested(boolean runEventsRequested)

Send test run status updates to the Orchestrator.

public TestEventClientArgs.Builder setTestPlatformMigration(boolean testPlatformMigration)

Temporary workaround - should this use the new test platform event client

public TestEventClientArgs.Builder setTestDiscoveryService(java.lang.String testDiscoveryService)

Discover available tests and send TestDiscoveryEvents back to the Orchestrator v2 androidx.test.services.events.discovery.ITestDiscoveryEvent service.

This implicitly sets TestEventClientArgs.Builder.testDiscoveryRequested to true.

public TestEventClientArgs.Builder setTestRunEventService(java.lang.String testRunEventService)

Send TestRunEvents back to the Orchestrator v2 androidx.test.services.events.run.ITestRunEvent service.

This implicitly sets TestEventClientArgs.Builder.testRunEventsRequested to true.

public TestEventClientArgs.Builder setConnectionFactory(TestEventClientArgs.ConnectionFactory connectionFactory)

If a custom connectionFactory instance is provided, then TestEventClient will use this factory to create the TestEventServiceConnection. This is used by AndroidJUnitRunner to override the connection to use for the legacy v1 androidx.test.orchestrator.OrchestratorService, i.e. when argument TestEventClientArgs.Builder.orchestratorService is provided.

public TestEventClientArgs build()

Determines which operation to perform (test discovery, or test run event notifications) by evaluating the provided arguments.

Returns:

a new TestEventClientArgs instance