使用 Malinskiy 的马拉松 gradle 插件配置或指定 Marathonfile?

Configure or specify Marathonfile with Malinskiy's marathon gradle plugin?

我正在使用 Marathon 的 gradle 插件来 运行 我的测试。 Gradle 任务包括 "marathon" 和 "marathonInternalStagingAndroidTest"。我可以从 Android Studio 和命令行 运行。我似乎无法做的是配置它。该文档没有说明有关配置 gradle 插件的任何内容。

可以通过gradle任务配置吗?还是可以像标准安装那样使用 Marathonfile?

./gradlew marathon -Pmarathonfile='/Users//Android/Marathonfile' 运行s 马拉松任务,但它不使用我指向的 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
}