Ho installato phpunit su Windows e ho copiato il programma di esempio. Cambiare l'url a google.comRitorni al caso del test del selenio Processo terminato con codice di uscita 0
<?php
require_once 'PHPUnit/Autoload.php';
require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
class WebTest extends PHPUnit_Extensions_SeleniumTestCase
{
protected function setUp()
{
$this->setBrowser('*firefox');
$this->setBrowserUrl('http://www.google.com/');
}
public function testTitle()
{
$this->open('http://www.google.com/');
$this->assertTitleEquals('Example Web Page');
}
}
?>
Il vaso seleinum è in esecuzione:
20:37:24.855 INFO - Java: Sun Microsystems Inc. 20.0-b11
20:37:24.918 INFO - OS: Windows 7 6.1 x86
20:37:25.042 INFO - v2.0 [rc2], with Core v2.0 [rc2]
20:37:27.554 INFO - RemoteWebDriver instances should connect to: http://127.0.0.
1:4444/wd/hub
20:37:27.570 INFO - Version Jetty/5.1.x
20:37:27.585 INFO - Started HttpContext[/selenium-server/driver,/selenium-server
/driver]
20:37:27.601 INFO - Started HttpContext[/selenium-server,/selenium-server]
20:37:27.601 INFO - Started HttpContext[/,/]
20:37:27.913 INFO - Started [email protected]
20:37:27.913 INFO - Started HttpContext[/wd,/wd]
20:37:27.960 INFO - Started SocketListener on 0.0.0.0:4444
20:37:27.991 INFO - Started [email protected]
Quando eseguo il codice dalla riga di comando ottengo Process finished with exit code 0