This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

jonathan26298
jonathan26298

Hi, What is the Selenium version requirements for the functional tests to run? I created a fresh copy of OctoberCMS build 428 in PHP 7 environment and pulled the dependencies via composer, then I tried running some functional tests using Selenium standalone server v3.7.1 (latest at this moment) but it failed with the following message:

There was 1 error:

1) TemplateTest::testOpenTemplates

Invalid response while accessing the Selenium Server at 'http://127.0.0.1:4444/selenium-server/driver/': <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <link rel="stylesheet" type="text/css" href="/assets/displayhelpservlet.css" media="all"/>
  <link href="/assets/favicon.ico" rel="icon" type="image/x-icon" />
  <script src="/assets/jquery-3.1.1.min.js" type="text/javascript"></script>
  <script src="/assets/displayhelpservlet.js" type="text/javascript"></script>
  <script type="text/javascript">
    var json = Object.freeze('{"version":"3.7.1","type":"Standalone","consoleLink":"/wd/hub"}');
  </script>
</head>
<body>

<div id="content">
  <div id="help-heading">
    <h1><span id="logo"></span></h1>
    <h2>Selenium <span class="se-type"></span>&nbsp;v.<span class="se-version"></span></h2>
  </div>

  <div id="content-body">
    <p>
      Whoops! The URL specified routes to this help page.
    </p>
    <p>
      For more information about Selenium <span class="se-type"></span> please see the
      <a class="se-docs">docs</a> and/or visit the <a class="se-wiki">wiki</a>.
      <span id="console-item">
        Or perhaps you are looking for the Selenium <span class="se-type"></span> <a class="se-console">console</a>.
      </span>
    </p>
    <p>
      Happy Testing!
    </p>
  </div>

  <div>
    <footer id="help-footer">
      Selenium is made possible through the efforts of our open source community, contributions from
      these <a href="https://github.com/SeleniumHQ/selenium/blob/master/AUTHORS">people</a>, and our
      <a href="http://www.seleniumhq.org/sponsors/">sponsors</a>.
   </footer>
  </div>
 </div>

</body>
</html>

/Applications/MAMP/htdocs/october-428/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumTestCase/Driver.php:1016
/Applications/MAMP/htdocs/october-428/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumTestCase.php:648

Caused by
RuntimeException: Invalid response while accessing the Selenium Server at 'http://127.0.0.1:4444/selenium-server/driver/': <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <link rel="stylesheet" type="text/css" href="/assets/displayhelpservlet.css" media="all"/>
  <link href="/assets/favicon.ico" rel="icon" type="image/x-icon" />
  <script src="/assets/jquery-3.1.1.min.js" type="text/javascript"></script>
  <script src="/assets/displayhelpservlet.js" type="text/javascript"></script>
  <script type="text/javascript">
    var json = Object.freeze('{"version":"3.7.1","type":"Standalone","consoleLink":"/wd/hub"}');
  </script>
</head>
<body>

<div id="content">
  <div id="help-heading">
    <h1><span id="logo"></span></h1>
    <h2>Selenium <span class="se-type"></span>&nbsp;v.<span class="se-version"></span></h2>
  </div>

  <div id="content-body">
    <p>
      Whoops! The URL specified routes to this help page.
    </p>
    <p>
      For more information about Selenium <span class="se-type"></span> please see the
      <a class="se-docs">docs</a> and/or visit the <a class="se-wiki">wiki</a>.
      <span id="console-item">
        Or perhaps you are looking for the Selenium <span class="se-type"></span> <a class="se-console">console</a>.
      </span>
    </p>
    <p>
      Happy Testing!
    </p>
  </div>

  <div>
    <footer id="help-footer">
      Selenium is made possible through the efforts of our open source community, contributions from
      these <a href="https://github.com/SeleniumHQ/selenium/blob/master/AUTHORS">people</a>, and our
      <a href="http://www.seleniumhq.org/sponsors/">sponsors</a>.
   </footer>
  </div>
 </div>

</body>
</html> in /Applications/MAMP/htdocs/october-428/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumTestCase/Driver.php:1016
Stack trace:
#0 /Applications/MAMP/htdocs/october-428/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumTestCase/Driver.php(1102): PHPUnit_Extensions_SeleniumTestCase_Driver->doCommand('getNewBrowserSe...', Array)
#1 /Applications/MAMP/htdocs/october-428/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumTestCase/Driver.php(196): PHPUnit_Extensions_SeleniumTestCase_Driver->getString('getNewBrowserSe...', Array)
#2 /Applications/MAMP/htdocs/october-428/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumTestCase.php(868): PHPUnit_Extensions_SeleniumTestCase_Driver->start()
#3 /Applications/MAMP/htdocs/october-428/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumTestCase.php(770): PHPUnit_Extensions_SeleniumTestCase->__call('start', Array)
#4 /Applications/MAMP/htdocs/october-428/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumTestCase.php(783): PHPUnit_Extensions_SeleniumTestCase->prepareTestSession()
#5 phar:///usr/local/bin/phpunit/phpunit/Framework/TestCase.php(913): PHPUnit_Extensions_SeleniumTestCase->runTest()
#6 phar:///usr/local/bin/phpunit/phpunit/Framework/TestResult.php(686): PHPUnit_Framework_TestCase->runBare()
#7 phar:///usr/local/bin/phpunit/phpunit/Framework/TestCase.php(868): PHPUnit_Framework_TestResult->run(Object(TemplateTest))
#8 /Applications/MAMP/htdocs/october-428/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumTestCase.php(648): PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_TestResult))
#9 phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php(722): PHPUnit_Extensions_SeleniumTestCase->run(Object(PHPUnit_Framework_TestResult))
#10 phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php(722): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult))
#11 phar:///usr/local/bin/phpunit/phpunit/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult))
#12 phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true)
#13 phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true)
#14 /usr/local/bin/phpunit(592): PHPUnit_TextUI_Command::main()
#15 {main}
ERRORS!
Tests: 1, Assertions: 0, Errors: 1.

After much digging, I used Selenium standalone server version 2.53.1, downloaded Firefox version 42 and finally got it working. As I'm new to functional testing, would like to seek clarification if this is the way to setup functional testing using Selenium in OctoberCMS? Is there anyway to use the latest Selenium and Firefox to test instead? Do you have any helpful resources that could help me? And I think the OctoberCMS documentation on System Testing could be expounded.

Thank you for your time!

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.