1
package com.avito.instrumentation
3
import com.avito.instrumentation.configuration.report.ReportConfig
5
internal fun kotlinStubConfig(reportConfig: ReportConfig) = """
8
| testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
9
| testInstrumentationRunnerArguments(
11
| "override" to "createdInInstrumentationRunnerArguments",
12
| "expectedCustomParam" to "value"
20
| outputDir.set(rootProject.file("outputs"))
22
| instrumentationParams = mapOf(
23
| "override" to "overrideInPlugin"
27
ReportConfig.NoOp -> "ReportConfig.NoOp"
28
is ReportConfig.ReportViewer.SendFromDevice -> """
29
| ReportConfig.ReportViewer.SendFromDevice(
30
| reportApiUrl = "${reportConfig.reportApiUrl}",
31
| reportViewerUrl = "${reportConfig.reportViewerUrl}",
32
| fileStorageUrl = "${reportConfig.fileStorageUrl}",
33
| planSlug = "${reportConfig.planSlug}",
34
| jobSlug = "${reportConfig.jobSlug}"
37
is ReportConfig.ReportViewer.SendFromRunner -> """
38
| ReportConfig.ReportViewer.SendFromRunner(
39
| reportApiUrl = "${reportConfig.reportApiUrl}",
40
| reportViewerUrl = "${reportConfig.reportViewerUrl}",
41
| fileStorageUrl = "${reportConfig.fileStorageUrl}",
42
| planSlug = "${reportConfig.planSlug}",
43
| jobSlug = "${reportConfig.jobSlug}"
50
| register("functional") {
51
| instrumentationParams = mapOf(
52
| "configuration" to "functional",
53
| "override" to "overrideInConfiguration"
55
| jobSlug.set("override jobSlug")
56
| suppressFlaky.set(true)
57
| suppressFailure.set(true)
61
| instrumentationParams = mapOf(
62
| "deviceName" to "invalid",
64
| "override" to "overrideInTarget"
67
| deviceName = "api22"
71
| minimumSuccessCount = 1
74
| staticDevicesReservation {
75
| device = Device.LocalEmulator.device(27)
85
| register<com.avito.instrumentation.configuration.KubernetesViaContext>("k8sContext") {
87
| namespace.set("default")
89
| register<com.avito.instrumentation.configuration.KubernetesViaCredentials>("k8sCredentials") {
91
| url.set("myk8s.com")
92
| namespace.set("default")