Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use skipServerInstallation same way as with uiautomator2-driver #526

Merged
merged 2 commits into from
Jan 4, 2020

Conversation

rajdeepv
Copy link
Collaborator

@rajdeepv rajdeepv commented Jan 3, 2020

Rebuilding the espresso-server using Gradle is time-consuming on slower machines and increases startup time significantly. With uiautomator2-driver there is a capability called skipServerInstallation which assumes that the device already has required servers. This can be usable with espresso-driver

@mykola-mokhnach mykola-mokhnach merged commit a0af792 into appium:master Jan 4, 2020
@rajdeepv rajdeepv deleted the skipServerInstallation branch January 4, 2020 10:36
@mykola-mokhnach
Copy link
Contributor

mykola-mokhnach commented Jan 5, 2020

I would like to add this option should be used with care. Espresso code only rebuilds the server when it is necessary, which means that having this option enabled could potentially break automated tests if the Appium code and the already installed server binary are out of sync.

By default the prebuilt server binary is stored to the tmpDir folder defined as https://github.com/appium/appium-base-driver/blob/8624a8061f836c14e331aeace39a352d31fcb875/lib/basedriver/driver.js#L64

Providing a custom path to this folder in capabilities (by default this is the OS temp folder root) will help to preserve the precompiled server binary between server runs and/or OS reboots.

@KazuCocoa FYI

@rajdeepv
Copy link
Collaborator Author

rajdeepv commented Jan 5, 2020

I agree that one has to be careful while using this capability and one must clearly know what they are doing. The same is applicable with some other capabilities in the context of espresso (eg. 'noSign' capability)

Providing a custom path to server apk in capabilities is no better because even this option if enabled could potentially break automated tests if the Appium code and the server apk with custom path are out of sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants