I am working on an automated functional unit testing in PHP. I want to run a test on staging environment using PhpStorm and I am following this link: https://www.sitepoint.com/using-selenium-with-phpunit/. I have complete tasks up-to this code : i have visited this link but not work for me. The path to the driver executable must be set by the webdriver.gecko.driver system property
<?php
/**
* Created by PhpStorm.
* User: Developer4
* Date: 11/2/2016
* Time: 1:41 PM
*/
class uatTest extends PHPUnit_Extensions_Selenium2TestCase
{
public function setUp()
{
$this->setHost('localhost');
$this->setPort(4444);
$this->setBrowserUrl('https://www.facebook.com/');
$this->setBrowser('firefox');
}
public function tearDown()
{
$this->stop();
}
public function validInputsProvider()
{
$inputs[] = [
[
'email' => 'user',
'pass' => 'pass'
]
];
return $inputs;
}
public function testFormSubmissionWithUsername()
{
$this->byName('email')->value('user');
$this->byId('loginbutton')->submit();
$email = $this->byName('email');
$this->assertEquals('user', $email->value());
}
}
as my selenium server is running:
when i have run my test on phpstorm i get this error
Error:
C:\wamp\bin\php\php5.6.25\php.exe C:/wamp/www/PHPUnit-and-Composer-Workflow/vendor/phpunit/phpunit/phpunit --no-configuration uatTest C:\wamp\www\PHPUnit-and-Composer-Workflow\test\uatTest.php --teamcity
Testing started at 2:53 PM ...
PHPUnit 5.6.2 by Sebastian Bergmann and contributors.
The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see https://github.com/mozilla/geckodriver. The latest version can be downloaded from https://github.com/mozilla/geckodriver/releases
C:\wamp\www\PHPUnit-and-Composer-Workflow\vendor\phpunit\phpunit-selenium\PHPUnit\Extensions\Selenium2TestCase\Driver.php:165
C:\wamp\www\PHPUnit-and-Composer-Workflow\vendor\phpunit\phpunit-selenium\PHPUnit\Extensions\Selenium2TestCase\Driver.php:72
C:\wamp\www\PHPUnit-and-Composer-Workflow\vendor\phpunit\phpunit-selenium\PHPUnit\Extensions\Selenium2TestCase\SessionStrategy\Isolated.php:67
C:\wamp\www\PHPUnit-and-Composer-Workflow\vendor\phpunit\phpunit-selenium\PHPUnit\Extensions\Selenium2TestCase.php:296
C:\wamp\www\PHPUnit-and-Composer-Workflow\vendor\phpunit\phpunit-selenium\PHPUnit\Extensions\Selenium2TestCase.php:337
C:\wamp\www\PHPUnit-and-Composer-Workflow\vendor\phpunit\phpunit-selenium\PHPUnit\Extensions\Selenium2TestCase.php:314
Time: 823 ms, Memory: 3.50MB
ERRORS!
Tests: 1, Assertions: 0, Errors: 1.
Process finished with exit code 2