Skip to content

Commit

Permalink
feat(readme): add configuration and execution
Browse files Browse the repository at this point in the history
  • Loading branch information
Malinskiy committed May 8, 2024
1 parent 3a89428 commit 608736d
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 2 deletions.
Binary file added .idea/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 78 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ For more information see the [documentation][docs]
| | Missing features, e.g. multi-module testing |


### Configuration

### Setup
Marathon gradle plugin is published to [plugins.gradle.org][plugins-gradle].
To apply the plugin:

Expand All @@ -53,8 +52,85 @@ plugins {
}
```

### Configuration
Configuration for Gradle Plugin can only be done via Gradle, i.e. you can't use Marathonfile as configuration when running tests using Gradle Plugin.

Here is an example of gradle config using Kotlin DSL (for more information about the parameters see the [documentation][docs]):
```kotlin
marathon {
name = "sample-app tests"
baseOutputDir = "./marathon"
outputConfiguration {
maxPath = 1024
}
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 {
allowlist {
add(SimpleClassnameFilterConfiguration(".*".toRegex()))
}
blocklist {
add(SimpleClassnameFilterConfiguration("$^".toRegex()))
}
}
includeSerialRegexes = emptyList()
excludeSerialRegexes = emptyList()
uncompletedTestRetryQuota = 100
ignoreFailures = false
isCodeCoverageEnabled = false
fallbackToScreenshots = false
testOutputTimeoutMillis = 30_000
debug = true
autoGrantPermission = true
}
```

### Execute
Executing your tests via gradle is done via calling generated marathon gradle task, for example marathonDebugAndroidTest.
All the test tasks will start with **marathon** prefix, for example **marathonDebugAndroidTest**.
These tasks will be created for all testing flavors including multi-dimension setup.

```shell
$ gradle :app:marathonDebugAndroidTest
```

## Contributing

Expand Down

0 comments on commit 608736d

Please sign in to comment.