Class: Google::Apis::TestingV1::ShardingOption

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/testing_v1/classes.rb,
lib/google/apis/testing_v1/representations.rb,
lib/google/apis/testing_v1/representations.rb

Overview

Options for enabling sharding.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ShardingOption

Returns a new instance of ShardingOption.



1955
1956
1957
# File 'lib/google/apis/testing_v1/classes.rb', line 1955

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#manual_shardingGoogle::Apis::TestingV1::ManualSharding

Shards test cases into the specified groups of packages, classes, and/or methods. With manual sharding enabled, specifying test targets via environment_variables or in InstrumentationTest is invalid. Corresponds to the JSON property manualSharding



1943
1944
1945
# File 'lib/google/apis/testing_v1/classes.rb', line 1943

def manual_sharding
  @manual_sharding
end

#uniform_shardingGoogle::Apis::TestingV1::UniformSharding

Uniformly shards test cases given a total number of shards. For Instrumentation test, it will be translated to "-e numShard" "-e shardIndex" AndroidJUnitRunner arguments. Based on the sharding mechanism AndroidJUnitRunner uses, there is no guarantee that test cases will be distributed uniformly across all shards. With uniform sharding enabled, specifying these sharding arguments via environment_variables is invalid. Corresponds to the JSON property uniformSharding



1953
1954
1955
# File 'lib/google/apis/testing_v1/classes.rb', line 1953

def uniform_sharding
  @uniform_sharding
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1960
1961
1962
1963
# File 'lib/google/apis/testing_v1/classes.rb', line 1960

def update!(**args)
  @manual_sharding = args[:manual_sharding] if args.key?(:manual_sharding)
  @uniform_sharding = args[:uniform_sharding] if args.key?(:uniform_sharding)
end