I was trying to run Functional Javascript tests with Docksal. Because of the way Docker works, my running chromedriver in a terminal had no effect, so as far as PHPUnit could tell, chromedriver was missing.
However, tests are skipped with no explanation of the problem:
vendor/bin/phpunit docroot/modules/custom/mymodule/tests/src/FunctionalJavascript/MyTest.php
PHPUnit 6.5.14 by Sebastian Bergmann and contributors.
Testing Drupal\Tests\mymodule\FunctionalJavascript\MyTest
S 1 / 1 (100%)
Time: 2.83 minutes, Memory: 4.00MB
OK, but incomplete, skipped, or risky tests!
Tests: 1, Assertions: 1, Skipped: 1.
There should be a message that explains why the tests are being skipped.
Comments
Comment #3
joachim commentedThis is done by code in WebDriverTestBase::initMink() which intentionally marks tests as skipped if the required infrastructure is missing:
I think these should all be considered test failures rather than skipped.
Comment #4
dsdeiz commentedYeah, I experienced this as well. Not really a fix but adding
--verboseflag tophpunitshows the messages of why the tests were skipped. Might help others who encountered this as well.Comment #8
tim.plunkettFYI #3187577: FunctionalJavascript tests should fail when ChromeDriver is not running was opened later but has more discussion