Skip to content

Commit

Permalink
refactor instruments and add appium-internal flake support
Browse files Browse the repository at this point in the history
This commit constitutes a pretty big refactor of the instruments
process handler. It also introduces a server flag, '--backend-retries',
with a default of '3', which specifies how many times Appium will retry
launching instruments before giving up and saying that it crashed or
timed out. This works in concert with launchTimeout, of course.

I think this refactor also fixes some longstanding callback reasoning
errors and maybe some other bugs.

It might also introduce some bugs of its own though :-)
  • Loading branch information
jlipps committed Dec 18, 2013
1 parent 9afbf03 commit 4a1cc25
Show file tree
Hide file tree
Showing 7 changed files with 275 additions and 216 deletions.
1 change: 1 addition & 0 deletions docs/server-args.md
Expand Up @@ -16,6 +16,7 @@ All flags are optional, but some are required in conjunction with certain others
|`-p`, `--port`|4723|port to listen on|`--port 4723`|
|`-dp`, `--device-port`|4724|(Android-only) port to connect to device on|`--device-port 4724`|
|`-k`, `--keep-artifacts`|false|(IOS-only) Keep Instruments trace directories||
|`-r`, `--backend-retries`|3|(iOS-only) How many times to retry launching Instruments before saying it crashed or timed out|`--backend-retries 3`|
|`--session-override`|false|Enables session override (clobbering)||
|`--full-reset`|false|(Android-only) Reset app state by uninstalling app instead of clearing app data||
|`--no-reset`|false|Don't reset app state between sessions (IOS: don't delete app plist files; Android: don't uninstall app before new session)||
Expand Down
1 change: 1 addition & 0 deletions lib/appium.js
Expand Up @@ -546,6 +546,7 @@ Appium.prototype.initDevice = function() {
, isSafariLauncherApp: this.isSafariLauncherApp
, desiredCapabilities: this.desiredCapabilities
, logNoColors: this.args.logNoColors
, flakeyRetries: this.args.backendRetries
};
if (this.desiredCapabilities.safari || this.desiredCapabilities.iwebview) {
this.device = new Safari(iosOpts);
Expand Down

0 comments on commit 4a1cc25

Please sign in to comment.