Sharding
Sharding is a mechanism that allows the marathon to affect the tests scheduled for execution inside each pool.
caution
Sharding in marathon is NOT related to splitting the tests into parallel runs. If you're looking for parallelization of marathon runs - check out the fragmentation filter
Parallel sharding
Executes each test using available devices. This is the default behaviour.
- Marathonfile
- Kotlin DSL
- Groovy DSL
shardingStrategy:
type: "parallel"
marathon {
shardingStrategy {}
}
marathon {
shardingStrategy {}
}
Count sharding
Executes each test count times inside each pool. For example you want to test the flakiness of a specific test hence you need to execute this test a lot of times. Instead of running the build X times just use this sharding strategy and the test will be executed X times.
- Marathonfile
- Kotlin DSL
- Groovy DSL
shardingStrategy:
type: "count"
count: 5
marathon {
shardingStrategy {
countSharding {
count = 5
}
}
}
marathon {
shardingStrategy {
countSharding {
count = 5
}
}
}