我正在使用Marathon的gradle插件来运行测试。 Gradle任务包括“ marathon”和“ marathonInternalStagingAndroidTest”。我可以从Android Studio和命令行运行。我似乎无法做的是配置它。该文档没有说明有关配置gradle插件的任何内容。
可以通过gradle任务配置它吗?还是可以像标准安装一样使用Marathonfile?
../ gradlew marathon -Pmarathonfile ='/ Users // Android / Marathonfile'运行马拉松任务,但不使用我指向的Marathonfile。
在撰写本文时,gradle插件未使用Marathonfile。截至今天,documentation也已更新!通过在您的gradle文件中添加groovy / kotlin DSL来进行配置,如下所示:
marathon {
name = "sample-app tests"
baseOutputDir = "./marathon"
analytics {
influx {
url = "http://influx.svc.cluster.local:8086"
user = "root"
password = "root"
dbName = "marathon"
}
}
poolingStrategy {
operatingSystem = true
}
shardingStrategy {
countSharding {
count = 5
}
}
sortingStrategy {
executionTime {
percentile = 90.0
executionTime = Instant.now().minus(3, ChronoUnit.DAYS)
}
}
batchingStrategy {
fixedSize {
size = 10
}
}
flakinessStrategy {
probabilityBased {
minSuccessRate = 0.8
maxCount = 3
timeLimit = Instant.now().minus(30, ChronoUnit.DAYS)
}
}
retryStrategy {
fixedQuota {
totalAllowedRetryQuota = 200
retryPerTestQuota = 3
}
}
filteringConfiguration {
whitelist {
add(SimpleClassnameFilter(".*".toRegex()))
}
blacklist {
add(SimpleClassnameFilter("$^".toRegex()))
}
}
testClassRegexes = listOf("^((?!Abstract).)*Test$")
includeSerialRegexes = emptyList()
excludeSerialRegexes = emptyList()
uncompletedTestRetryQuota = 100
ignoreFailures = false
isCodeCoverageEnabled = false
fallbackToScreenshots = false
testOutputTimeoutMillis = 30_000
strictMode = false
debug = true
autoGrantPermission = true
}