Struct google_api_proto::google::devtools::testing::v1::AndroidInstrumentationTest
source · pub struct AndroidInstrumentationTest {
pub test_apk: Option<FileReference>,
pub app_package_id: String,
pub test_package_id: String,
pub test_runner_class: String,
pub test_targets: Vec<String>,
pub orchestrator_option: i32,
pub sharding_option: Option<ShardingOption>,
pub app_under_test: Option<AppUnderTest>,
}
Expand description
A test of an Android application that can control an Android component independently of its normal lifecycle. Android instrumentation tests run an application APK and test APK inside the same process on a virtual or physical AndroidDevice. They also specify a test runner class, such as com.google.GoogleTestRunner, which can vary on the specific instrumentation framework chosen.
See <https://developer.android.com/training/testing/fundamentals> for more information on types of Android tests.
Fields§
§test_apk: Option<FileReference>
Required. The APK containing the test code to be executed.
app_package_id: String
The java package for the application under test. The default value is determined by examining the application’s manifest.
test_package_id: String
The java package for the test to be executed. The default value is determined by examining the application’s manifest.
test_runner_class: String
The InstrumentationTestRunner class. The default value is determined by examining the application’s manifest.
test_targets: Vec<String>
Each target must be fully qualified with the package name or class name, in one of these formats:
- “package package_name”
- “class package_name.class_name”
- “class package_name.class_name#method_name”
If empty, all targets in the module will be run.
orchestrator_option: i32
The option of whether running each test within its own invocation of instrumentation with Android Test Orchestrator or not. ** Orchestrator is only compatible with AndroidJUnitRunner version 1.1 or higher! ** Orchestrator offers the following benefits:
- No shared state
- Crashes are isolated
- Logs are scoped per test
See <https://developer.android.com/training/testing/junit-runner.html#using-android-test-orchestrator> for more information about Android Test Orchestrator.
If not set, the test will be run without the orchestrator.
sharding_option: Option<ShardingOption>
The option to run tests in multiple shards in parallel.
app_under_test: Option<AppUnderTest>
Required.
Implementations§
source§impl AndroidInstrumentationTest
impl AndroidInstrumentationTest
sourcepub fn orchestrator_option(&self) -> OrchestratorOption
pub fn orchestrator_option(&self) -> OrchestratorOption
Returns the enum value of orchestrator_option
, or the default if the field is set to an invalid enum value.
sourcepub fn set_orchestrator_option(&mut self, value: OrchestratorOption)
pub fn set_orchestrator_option(&mut self, value: OrchestratorOption)
Sets orchestrator_option
to the provided enum value.
Trait Implementations§
source§impl Clone for AndroidInstrumentationTest
impl Clone for AndroidInstrumentationTest
source§fn clone(&self) -> AndroidInstrumentationTest
fn clone(&self) -> AndroidInstrumentationTest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AndroidInstrumentationTest
impl Debug for AndroidInstrumentationTest
source§impl Default for AndroidInstrumentationTest
impl Default for AndroidInstrumentationTest
source§impl Message for AndroidInstrumentationTest
impl Message for AndroidInstrumentationTest
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for AndroidInstrumentationTest
impl PartialEq for AndroidInstrumentationTest
source§fn eq(&self, other: &AndroidInstrumentationTest) -> bool
fn eq(&self, other: &AndroidInstrumentationTest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for AndroidInstrumentationTest
Auto Trait Implementations§
impl Freeze for AndroidInstrumentationTest
impl RefUnwindSafe for AndroidInstrumentationTest
impl Send for AndroidInstrumentationTest
impl Sync for AndroidInstrumentationTest
impl Unpin for AndroidInstrumentationTest
impl UnwindSafe for AndroidInstrumentationTest
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request