Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
Update Readme. Also improvements in params check to avoid misleading …
Browse files Browse the repository at this point in the history
…log.
  • Loading branch information
Francesco Pezzato committed Apr 11, 2016
1 parent 6e13843 commit 051307a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,19 @@ Will potentially be unsupported, as it's the least developer friendly. Check out
```
> gradlew fork-runner:run -Pargs='ARGUMENTS LIST'
With the below options. The APK and test APK parameters are mandatory:
--sdk Path to Android SDK. Defaults to the ANDROID_HOME environment variable.
--apk Path to application. This parameter is required.
--test-apk Path to test application. This parameter is required.
--output Output path. Defaults to "fork-output"
--test-package The package to consider when finding tests to run. Defaults to instrumentation package.
--test-class-regex Regex determining class names to consider when finding tests to run. Defaults to ^((?!Abstract).)*Test$
--test-timeout The maximum amount of time during which the tests are allowed to not output any response, in milliseconds
--fail-on-failure Non-zero exit code on failure. Defaults to false.
--fallback-to-screenshots If a device does not support videos, define if you'd like animated GIFs (experimental). Defaults to true.
With the below options. The APK and test APK parameters are mandatory:
--sdk Path to Android SDK. Defaults to the ANDROID_HOME environment variable.
--apk Path to application. This parameter is required.
--test-apk Path to test application. This parameter is required.
--output Output path. Defaults to "fork-output"
--test-package The package to consider when finding tests to run. Defaults to instrumentation package.
--test-class-regex Regex determining class names to consider when finding tests to run. Defaults to ^((?!Abstract).)*Test$
--test-timeout The maximum amount of time during which the tests are allowed to not output any response, in milliseconds
--fail-on-failure Non-zero exit code on failure. Defaults to false.
--fallback-to-screenshots If a device does not support videos, define if you'd like animated GIFs (experimental). Defaults to true.
--total-allowed-retry-quota Total amount of allowed retries. If a test case fails and this quota hasn't been exhausted yet,
the test case is scheduled to be executed again in the same device pool. Default to 0;
--retry-per-test-case-quota Amount of times a single test can be re-executed before declaring it a failure. Default to 1.
```

For example:
Expand Down
2 changes: 1 addition & 1 deletion fork-runner/src/main/java/com/shazam/fork/ForkBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public Fork build() {
}

private void logArgumentsBadInteractions() {
if(totalAllowedRetryQuota < retryPerTestCaseQuota){
if(totalAllowedRetryQuota > 0 && totalAllowedRetryQuota < retryPerTestCaseQuota){
logger.warn("Total allowed retry quota ["+totalAllowedRetryQuota+"] " +
"is smaller than Retry per test case quota ["+retryPerTestCaseQuota+"]. " +
"This is suspicious as the fist mentioned parameter is an overall cap.");
Expand Down

0 comments on commit 051307a

Please sign in to comment.