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

Add library argument and keyword to set sleep between wait until loop #313

Merged
merged 4 commits into from
Dec 27, 2022

Conversation

idxn
Copy link
Contributor

@idxn idxn commented May 24, 2021

Sleep between wait until loop is an overhead to each wait loop if the appium server sits remotely.
With this PR, the test execution time over the network reduce gradually.

Implements

  • Library argument to set sleep between wait until loop

  • Add Set/Get sleep between wait until loop

@idxn
Copy link
Contributor Author

idxn commented Jun 2, 2021

@serhatbolsu Could you please review and provide any feedbacks you might have?

@serhatbolsu
Copy link
Owner

@idxn thank you for good documentation and PR, however can you tell me again, what is the harm of default 0.2 seconds?
As far as I know this is much higher in selenium.

Also in remote calls, appium is much slower then the wait time, its unlikely within that time frame something has changed already. Maybe you can compare an execution while having 0 internal sleep vs 0.2 internal sleep and post here

@idxn
Copy link
Contributor Author

idxn commented Jun 2, 2021

Here is an example. Let's say we execute the test via device cloud such as browserstack and the latency from our test runner to browserstack is 200ms. So in total, the sleep for each loop would be 400ms in minimum. This includes 200ms for latency and 200ms from internal sleep if the first iteration were missed because of false condition.
If your test has 10 wait until keywords, you would waste almost 4s for 1 test. On the other hand, without internal sleep, we may waste only 2s for 1 test.

Hope that answer your questions.

@serhatbolsu serhatbolsu merged commit 5f278ba into serhatbolsu:master Dec 27, 2022
@serhatbolsu
Copy link
Owner

Thank you @idxn

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.

2 participants