You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Etaoin does not seem to detect whether a binary, e.g. :chrome, is actually a reachable (or valid) binary.
I've faced at least two scenarios:
chromedriver is missing, forgot to install
chromedriver is there, but shadowed by another program called chromedriver: a Ruby gem.
In both cases, the situation is not clear to one when encountering Etaoin errors. I simply see generic timeout errors, which are a waste of time because they tend to lead me to think that there's something wrong with the codebase or the integration tests themselves.
Suggestion
Before trying to use a binary, perform a sanity check.
For example, ~/$ chromedriver --version returns ChromeDriver 2.44.609545 (c2f88692e98ce7233d2df7c724465ecacfe74df5), and performs instantly.
Other drivers predictably can also be queried in a similar fashion.
So, one can implement these 'checkers' which execute the --version command againt an expected output.
The only open question is how often to perform these checks. On every single test? Once? Eagerly, lazily? Etc.
Don't know if you have played with these ideas already in the past.
WDYT?
I can contribute a full implementation if you foresee it'll get into Etaoin.
Cheers - Victor
The text was updated successfully, but these errors were encountered:
Good idea! I believe we can check if a binary exists, and when it does not, throw a clear message saying what is missing and where it might be reached.
when spawning a process, check if there is a special exception meaning there is no a binary file (say, FileNotFoundException). If that case, catch that exception and throw a new one with the detailed message.
another way to check is to create a function or rather a multimethod that runs a binary with the --version or --help arguments. The exit code must be zero. When it's not, throw an error.
Pay attention, different drivers may behaive in different ways. Say, some of them accept --version and others not. That's why I suggested using a multimethod.
Another point, the error message must be clean. For example, "Cannot find a binary file for the driver. Please ensure you have the driver installed and specify the path to it. For driver installation, check out the official readme file from Etaoin: http://github.../etaoin/readme#..."
Problem statement
Etaoin does not seem to detect whether a binary, e.g.
:chrome
, is actually a reachable (or valid) binary.I've faced at least two scenarios:
In both cases, the situation is not clear to one when encountering Etaoin errors. I simply see generic
timeout
errors, which are a waste of time because they tend to lead me to think that there's something wrong with the codebase or the integration tests themselves.Suggestion
Before trying to use a binary, perform a sanity check.
For example,
~/$ chromedriver --version
returnsChromeDriver 2.44.609545 (c2f88692e98ce7233d2df7c724465ecacfe74df5)
, and performs instantly.Other drivers predictably can also be queried in a similar fashion.
So, one can implement these 'checkers' which execute the
--version
command againt an expected output.The only open question is how often to perform these checks. On every single test? Once? Eagerly, lazily? Etc.
Don't know if you have played with these ideas already in the past.
WDYT?
I can contribute a full implementation if you foresee it'll get into Etaoin.
Cheers - Victor
The text was updated successfully, but these errors were encountered: