theintern / intern

A next-generation code testing stack for JavaScript.
https://theintern.io/
Other
4.36k stars 309 forks source link

Create a frequently updated webdriver list #1071

Closed jason0x43 closed 4 years ago

jason0x43 commented 5 years ago

The most common use case with SeleniumTunnel is to use it with current versions of Chrome, Firefox, etc. Default WebDriver versions are hardcoded in SeleniumTunnel and tend to lag behind the current driver releases, which eventually causes problems with the latest browser versions. Updating the default WebDriver versions in SeleniumTunnel and releasing a new Intern just for updated drivers is a bit of a pain. Instead, SeleniumTunnel should use a listing service (we may need to create this; it could just be a file in a repo somewhere, or on Intern's site) that indicates at least the latest version for each driver.

jason0x43 commented 5 years ago

We might also want to consider relating webdriver versions to supported browser versions. This would allow us to download the proper driver for a given browser version (if known). For example, if an environment in in intern looked like { "browserName": "chrome", "browserVersion": "75" }, we could match 75 to the proper chromedriver version. (Basically, this would save Intern users from having to deal with tunnelOptions.)

rjbeers commented 5 years ago

This was discussed in theintern/digdug#60. Are you open to dynamically pulling the chromedriver from https://chromedriver.storage.googleapis.com/LATEST_RELEASE for example?

jason0x43 commented 5 years ago

At some level, yes, but the end solution needs to work for things other than Chrome (at least Selenium, IE, Edge, and Firefox). I was planning to use a static JSON file; something that would be simple to update vs publishing a new digdug package. While initially that file will be manually generated, it should ideally be automatically generated and updated.

jason0x43 commented 4 years ago

This has been partially implemented for a while, in that digdug / intern loads webdriver metadata from a JSON file. Step 2 is to separate that file from the application code so that it can be updated without having to update Intern itself.

My current plan is to have Intern check periodically for an updated metadata file, maybe once a day, from this repo (via raw.githubusercontent.com) and/or theintern.io, and cache the current versions locally.

The file can be updated manually for now, but could be automatically updated using, for example, a GitHub Action like this one.