【问题标题】:Configuration issues with PHPUnit and Selenium in PhpStormPhpStorm 中 PHPUnit 和 Selenium 的配置问题
【发布时间】:2017-03-15 13:10:00
【问题描述】:

我想使用 PhpStorm 在暂存环境上运行测试,我正在关注此链接:https://www.sitepoint.com/using-selenium-with-phpunit/。到此代码为止,我已经完成了任务:

require_once (__DIR__.'/../../../bin/php/php5.6.25/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/');
class uatTest extends PHPUnit_Extensions_Selenium2TestCase
{
    public function setUp()
    {
        $this->setHost('localhost');
        $this->setPort(8383);
        $this->setBrowserUrl('http://www.google.com/');
        $this->setBrowser('firefox');
    }
}

但现在我面临这个问题:

C:\wamp\bin\php\php5.6.25\php.exe C:\wamp\www\phpunit-5.6.2.phar --no-configuration uatTest C:\wamp\www\PHPUnit-and-Composer-Workflow\test\uatTest.php --teamcity
Testing started at 2:10 PM ...

Warning: require_once(C:\wamp\bin\php\php5.6.25\vendor\phpunit\phpunit-selenium\PHPUnit\Extensions): failed to open stream: Permission denied in C:\wamp\www\PHPUnit-and-Composer-Workflow\test\uatTest.php on line 9

Fatal error: require_once(): Failed opening required 'C:\wamp\www\PHPUnit-and-Composer-Workflow\test/../../../bin/php/php5.6.25/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/' (include_path='.;C:\php\pear') in C:\wamp\www\PHPUnit-and-Composer-Workflow\test\uatTest.php on line 9

Process finished with exit code 255

【问题讨论】:

    标签: php selenium phpunit phpstorm inputstream


    【解决方案1】:

    您必须重写 .htaccess 或更改 读/写权限 才能配置 selenium。

    【讨论】:

      猜你喜欢
      • 2016-01-22
      • 2012-03-31
      • 2013-05-08
      • 2012-08-01
      • 2019-03-30
      • 2021-06-16
      • 2011-07-25
      • 2015-06-03
      • 2018-03-24
      相关资源
      最近更新 更多