Class: Google::Apis::TestingV1::ShardingOption
- Inherits:
-
Object
- Object
- Google::Apis::TestingV1::ShardingOption
- 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
-
#manual_sharding ⇒ Google::Apis::TestingV1::ManualSharding
Shards test cases into the specified groups of packages, classes, and/or methods.
-
#smart_sharding ⇒ Google::Apis::TestingV1::SmartSharding
Shards test based on previous test case timing records.
-
#uniform_sharding ⇒ Google::Apis::TestingV1::UniformSharding
Uniformly shards test cases given a total number of shards.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ShardingOption
constructor
A new instance of ShardingOption.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ShardingOption
Returns a new instance of ShardingOption.
2164 2165 2166 |
# File 'lib/google/apis/testing_v1/classes.rb', line 2164 def initialize(**args) update!(**args) end |
Instance Attribute Details
#manual_sharding ⇒ Google::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
2147 2148 2149 |
# File 'lib/google/apis/testing_v1/classes.rb', line 2147 def manual_sharding @manual_sharding end |
#smart_sharding ⇒ Google::Apis::TestingV1::SmartSharding
Shards test based on previous test case timing records.
Corresponds to the JSON property smartSharding
2152 2153 2154 |
# File 'lib/google/apis/testing_v1/classes.rb', line 2152 def smart_sharding @smart_sharding end |
#uniform_sharding ⇒ Google::Apis::TestingV1::UniformSharding
Uniformly shards test cases given a total number of shards. For
instrumentation tests, it will be translated to "-e numShard" and "-e
shardIndex" AndroidJUnitRunner arguments. With uniform sharding enabled,
specifying either of these sharding arguments via environment_variables
is
invalid. Based on the sharding mechanism AndroidJUnitRunner uses, there is no
guarantee that test cases will be distributed uniformly across all shards.
Corresponds to the JSON property uniformSharding
2162 2163 2164 |
# File 'lib/google/apis/testing_v1/classes.rb', line 2162 def uniform_sharding @uniform_sharding end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2169 2170 2171 2172 2173 |
# File 'lib/google/apis/testing_v1/classes.rb', line 2169 def update!(**args) @manual_sharding = args[:manual_sharding] if args.key?(:manual_sharding) @smart_sharding = args[:smart_sharding] if args.key?(:smart_sharding) @uniform_sharding = args[:uniform_sharding] if args.key?(:uniform_sharding) end |