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

Using 'localhost' makes tests run 10x slower #1269

Closed
TroyWalshProf opened this issue Aug 17, 2020 · 5 comments
Closed

Using 'localhost' makes tests run 10x slower #1269

TroyWalshProf opened this issue Aug 17, 2020 · 5 comments

Comments

@TroyWalshProf
Copy link

If I use "http://127.0.0.1:4723" as the remote address when running tests locally, my test run fairly fast.
However, if I use 'http://localhost:4723' all my interactions are extremely slow, and my test execution time goes way up. - All interactions take about 10 times as long.

Sample test code:
https://github.com/Magenic/MAQS/blob/master/Framework/AppiumUnitTests/AppiumWinAppUnitTests.cs#L30
Line to change remote address:
https://github.com/Magenic/MAQS/blob/master/Framework/AppiumUnitTests/AppiumWinAppUnitTests.cs#L56

@Wolfe1
Copy link

Wolfe1 commented Aug 17, 2020

Hmmm I tried replicating on my end using this same code: https://github.com/Accruent/robotframework-zoomba/blob/master/samples/DesktopTests.robot (I work in python/robotframework) and I am not getting any noticeable difference between the two (average over 3 runs each).

How many lines do you have in your Windows Hosts file (aside from the commented out bits):
C:\Windows\System32\Drivers\etc\hosts

A large hosts file could cause a slowdown here.

@Wolfe1
Copy link

Wolfe1 commented Aug 17, 2020

Or perhaps you are using a proxy without this checked?
image

@naeemakram
Copy link

WinAppDriver is innocent in this case, it is not responsible for translating the localhost.
The slowness is not the root cause, it is the symptom of some other problem with the system.
The simple solution would be to not use localhost, just go with 127.0.0.1.

@resp78
Copy link

resp78 commented Aug 22, 2020

I too have noticed that it run slow with default configuration.

@TroyWalshProf
Copy link
Author

Did some more investigation and it appears this is a .Net core issue.

Notes*

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

No branches or pull requests

4 participants