<div dir="ltr"># TL;DR<br><br>You can now write Selenium tests in Node.js! Learn more about it at <a href="https://www.mediawiki.org/wiki/Selenium/Node.js">https://www.mediawiki.org/wiki/Selenium/Node.js</a><br><br># Introduction<br><br>Five years ago we introduced browser tests using Selenium and a Ruby based stack. It has worked great for some teams, and not so great for others. Last year we talked to people from several teams and ran a survey[0]. The outcome is a preference toward using a language developers are familiar with: JavaScript/Node.Js.<br><br>After several months of research and development, we are proud to announce support for writing tests in Node.js. We have decided to use WebdriverIO[1]. It is already available in MediaWiki core and supports running tests for extensions.<br><br>You can give it a try in MediaWiki-Vagrant[2]:<br><br>vagrant up<br>vagrant ssh<br>sudo apt-get install chromedriver<br>export PATH=$PATH:/usr/lib/chromium<br>cd /vagrant/mediawiki<br>xvfb-run npm run selenium<br><br># Documentation<br><br>Extensive details are available on the landing page: <a href="https://www.mediawiki.org/wiki/Selenium/Node.js">https://www.mediawiki.org/wiki/Selenium/Node.js</a> <br><br># Future<br><br>We plan to replace the majority of Selenium tests written in Ruby with tests in Node.js in the next 6 months. We can not force anybody to rewrite existing tests, but we will offer documentation and pairing sessions for teams that need help. After 6 months, teams that want to continue using Ruby framework will be able to do so, but without support from Release Engineering team.<br><br>I have submitted a skill share session for Wikimedia Hackathon 2017 in Vienna[3]. If you would like to pair on Selenium tests in person, that would be a great time.<br><br>The list of short term actions is in task T139740[4].<br><br># Thanks<br><br>I would like to thank several people for reviews, advice and code: Jean-Rene Branaa, Dan Duvall, Antoine Musso, Jon Robson, Timo Tijhof. (Names are sorted alphabetically by last name. Apologies to people I have forgot.)<br><br># References<br><br>[0]  <a href="https://www.mediawiki.org/wiki/Browser_testing_user_satisfaction_survey">https://www.mediawiki.org/wiki/Browser_testing_user_satisfaction_survey</a><br>[1] <a href="http://webdriver.io/">http://webdriver.io/</a><br>[2] <a href="https://www.mediawiki.org/wiki/Selenium/Node.js/Inside_MediaWiki-Vagrant">https://www.mediawiki.org/wiki/Selenium/Node.js/Inside_MediaWiki-Vagrant</a><br>[3] <a href="https://phabricator.wikimedia.org/T159945">https://phabricator.wikimedia.org/T159945</a><br>[4] <a href="https://phabricator.wikimedia.org/T139740">https://phabricator.wikimedia.org/T139740</a><br><br>Željko Filipin</div>