HerokuMars HallAnnouncement
Improved Browser Testing on Heroku with Chrome
Summary
Automated browser tests on Heroku can fail when installed Chrome and Chromedriver versions drift apart, producing a mismatch error that stops the suite. The post introduces the community Chrome for Testing Heroku Buildpack, created to address installation reliability as Chrome continuously receives updates rather than pinning a browser version that quickly becomes outdated. Apps should remove existing Chrome and Chromedriver buildpacks and add heroku-community/chrome-for-testing as the first buildpack. By default it downloads Google's latest Stable release, while GOOGLE_CHROME_CHANNEL can select Stable, Beta, Dev, or Canary. After deployment, chrome and chromedriver are placed on the dyno PATH for tools including Selenium WebDriver and Puppeteer, providing executables for browser automation.
Context
Heroku engineers found that automated Chrome tests were regularly disrupted by version mismatches between installed Chrome and Chromedriver components. Pinning a specific Chrome version is discouraged because Chrome continuously receives security updates and features.
Approach / What changed
The Chrome for Testing Heroku Buildpack installs Chrome and Chromedriver together. Developers add heroku-community/chrome-for-testing as the app's first buildpack, optionally set GOOGLE_CHROME_CHANNEL to Stable, Beta, Dev, or Canary, and deploy the app.
Takeaways
The mismatch error occurs when Chromedriver supports one Chrome version while the installed browser is another.
The buildpack defaults to Google's latest Stable release and supports Stable, Beta, Dev, and Canary channels through GOOGLE_CHROME_CHANNEL.
After deployment, chrome and chromedriver executables are available on dyno PATH for browser automation tools such as Selenium WebDriver and Puppeteer.
Source and freshness
- Source
- heroku.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.