Skip Navigation
Show nav
Heroku Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
View categories

Categories

  • Heroku Architecture
    • Dynos (app containers)
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Command Line
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery
    • Continuous Integration
  • Language Support
    • Node.js
    • Ruby
      • Rails Support
      • Working with Bundler
    • Python
      • Background Jobs in Python
      • Working with Django
    • Java
      • Working with Maven
      • Java Database Operations
      • Working with the Play Framework
      • Working with Spring Boot
      • Java Advanced Topics
    • PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
    • Heroku Data For Redis
    • Apache Kafka on Heroku
    • Other Data Stores
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
    • Compliance
  • Heroku Enterprise
    • Private Spaces
      • Infrastructure Networking
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
    • Single Sign-on (SSO)
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Continuous Delivery
  • Continuous Integration
  • Heroku CI: Browser and User Acceptance Testing (UAT)

Heroku CI: Browser and User Acceptance Testing (UAT)

English — 日本語に切り替える

Last updated March 09, 2022

Table of Contents

  • On browser testing / UAT
  • Browsers available
  • Testing with Selenium

UAT / browser testing is a beta feature of Heroku CI.

Browser support is subject to unannounced changes (to improve the feature), and support for UAT is limited to best effort response.

On browser testing / UAT

Heroku CI provides support for browser testing, or “user acceptance testing” (UAT) by providing options for installing browsers in your test run dyno. Users can choose between Google Chrome stable, beta, and unstable release channels supported by the --headless flag.

It’s important to note that while we provide options for installing browsers, it is the developers responsibility to drive the browser. Each language, web framework, and/or test framework tends to have it’s own prescription on how to drive and run tests in a browser (most commonly, this is done with Selenium). Most of these solutions can be supported with Heroku CI. We will be adding UAT tech stacks and set-ups below as they are tested and proven.

Browsers available

While we offer a few browsers to accommodate various needs, we strongly urge you to consider Google Chrome with --headless support first. It’s stable, has strong parity with user browsers, and is designed to enable this kind of testing.

Google Chrome

Google Chrome recently added support for a --headless command line option, which means you no longer need a window server to run browser tests. This configuration is optimal for UAT as it uses your browser, but doesn’t waste cycles rendering content to the screen. As such, this is our prescribed browser solution.

To use headless Google Chrome for Heroku CI runs, add the buildpack to the environments.test.buildpacks section of your app.json. For example, if you were using Chrome for NodeJs tests:

{
  "environments": {
    "test": {
      "buildpacks": [
        { "url": "heroku/google-chrome" },
        { "url": "heroku/nodejs" }
      ]
    }
  }
}

Now google-chrome (from the stable release channel by default) will be available in your test run, and it will automatically run in headless mode (the --headless flag is always used). See the buildpack documentation for additional details.

PhantomJS

PhantomJS is a headless browser built on NodeJS. It’s smaller and easier to install than Chrome, so it’s been a common choice for UAT for quite some time. Please note that Heroku CI runs can be configured to use PhantomJS, but we do not presently offer direct support for it, for two reasons: 1) It’s installed via a 3rd party buildpack, and 2) PhantomJS is no longer maintained.

To use PhantomJS for Heroku CI runs, add the buildpack to the environments.test.buildpacks section of your app.json. For example, if you were using PhantomJS in Ruby tests:

{
  "environments": {
    "test": {
      "buildpacks": [
        { "url": "heroku/ruby" },
        { "url": "https://github.com/stomita/heroku-buildpack-phantomjs" }
      ]
    }
  }
}

If you are using NodeJS, you may want to consider using the phantomjs-prebuilt instead.

Testing with Selenium

Heroku CI supports testing with Selenium via the Chrome buildpacks mentioned above. Additionally, to run Selenium in Heroku CI, you’ll need:

  1. Chromedriver - Your language or framework may already install this, if not, please see our Chromedriver buildpack
  2. Language bindings to Selenium - these will vary according to the language you selected.
  3. Special configuration to point chromedriver to the correct Chrome binary location (learn more)

Keep reading

  • Continuous Integration

Feedback

Log in to submit feedback.

Heroku CI: Technical Detail on Test Run Lifecycle Heroku CI In-Dyno Databases

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Podcasts
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing

Subscribe to our monthly newsletter

Your email address:

  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Heroku Podcasts
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Facebook
  • Instagram
  • Github
  • LinkedIn
  • YouTube
Heroku is acompany

 © Salesforce.com

  • heroku.com
  • Terms of Service
  • Privacy
  • Cookies
  • Cookie Preferences