2016-11-02 54 views
0

我想使用PhpStorm对分段环境进行测试,我正在关注此链接:https://www.sitepoint.com/using-selenium-with-phpunit/。我已经完成任务了,这个代码:PhpStorm中PHPUnit和Selenium的配置问题

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 

回答

0

您必须重写的.htaccess或改变读/写权限到配置硒。