Quantcast
Viewing all articles
Browse latest Browse all 294965

Enable W3C-compliant webdriver testing

Problem/Motivation

This is a follow-on from #3240792: Use lullabot/mink-selenium2-driver and lullabot/php-webdriver for functional browser testing. This issue enables W3C-compliant webdriver testing, thereby allowing Drupal's core tests, contrib module tests and custom tests to be run against modern browsers using selenium.

Proposed resolution

  • Fix Drupal code that uses non-W3C commands to use work on both W3C and non-W3C webdrivers.
  • Test against both W3C and non-W3C

Remaining tasks

  • Decide what mix of W3C and non-W3C tests we need to run.
    All nightwatch and functional JS tests to using selenium/standalone-chrome:latest - this is inline with our browser support policy and if it becomes an issue we will pin it to a verion.
  • Decide whether to add a manual job to run tests against Firefox
    This has to be a follow-up there are issues we need to resolve.
  • Decide whether to run W3C tests using drupalci/chromedriver or selenium/chromium. Our chromedriver image gets out of date and unmaintained quickly. This would help ensure Drupal is being tested on up-to-date browsers. The Selenium image also drops jsonwire support, which chromedriver still directly supports. This would force us to use the W3C standard, and allow us to test on other browsers in future.
    Using selenium/standalone-chrome:latest is inline with our browser support policy and we no longer have to maintain an image that gets out of date as quickly as we update it.
  • Decide what to run Performance tests and Test-only changes jobs using
    Moved to W3C / selenium

Followups:

User interface changes

None

API changes

\Drupal\FunctionalJavascriptTests\WebDriverCurlService is deprecated. This was added in #2942900-50: Convert JavascriptTestBase Tests to use DrupalSelenium2Driver. @longwave is pretty sure this has been fixed by https://issues.chromium.org/issues/42321790

Data model changes

None

Release notes snippet

Drupal core now tests using selenium/standalone-chrome:latest via a W3C compliant webdriver. To enable W3C mode in WebDriverTestBase tests, the MINK_DRIVER_ARGS_WEBDRIVER environment variable must pass "w3c": true in the options. To enable W3C mode in Nightwatch tests, the DRUPAL_TEST_WEBDRIVER_W3C environment variable must to be set to true.


Viewing all articles
Browse latest Browse all 294965

Trending Articles