trouble with selenium RC installation (maybe I install it in a wrong way)?

I install PHPUnit and Selenium for testing in PHP. I've done successfully with PHPUnit but seem something wrong with Selenium.

I am following the book "Agile Web Application Developer with Yii 1.1 and PHP5" and I get problem at page 47, chapter 3. I took the guide an run following command ( I am using Win 7)

cd cd protected/tests/
phpunit functional/SiteTest.php

and here is the output on the console:

C:\wamp\www\demo\protected\tests>phpunit functional/SiteTest.php
PHP Warning:  require_once(PHPUnit/Extensions/SeleniumTestCase.php): failed to o
pen stream: No such file or directory in C:\wamp\www\yii\framework\test\CWebTest
Case.php on line 11
PHP Stack trace:
PHP   1. {main}() C:\wamp\bin\php\php5.3.8\phpunit:0
PHP   2. PHPUnit_TextUI_Command::main() C:\wamp\bin\php\php5.3.8\phpunit:46
PHP   3. PHPUnit_TextUI_Command->run() C:\wamp\bin\php\php5.3.8\pear\PHPUnit\Tex
tUI\Command.php:125
PHP   4. PHPUnit_TextUI_Command->handleArguments() C:\wamp\bin\php\php5.3.8\pear
\PHPUnit\TextUI\Command.php:134
PHP   5. PHPUnit_TextUI_Command->handleBootstrap() C:\wamp\bin\php\php5.3.8\pear
\PHPUnit\TextUI\Command.php:615
PHP   6. PHPUnit_Util_Fileloader::checkAndLoad() C:\wamp\bin\php\php5.3.8\pear\P
HPUnit\TextUI\Command.php:833
PHP   7. PHPUnit_Util_Fileloader::load() C:\wamp\bin\php\php5.3.8\pear\PHPUnit\U
til\Fileloader.php:79
PHP   8. include_once() C:\wamp\bin\php\php5.3.8\pear\PHPUnit\Util\Fileloader.ph
p:95
PHP   9. require_once() C:\wamp\www\demo\protected\tests\bootstrap.php:8
PHP  10. YiiBase::autoload() C:\wamp\www\demo\protected\tests\bootstrap.php:0
PHP  11. include() C:\wamp\www\yii\framework\YiiBase.php:402

Warning: require_once(PHPUnit/Extensions/SeleniumTestCase.php): failed to open s
tream: No such file or directory in C:\wamp\www\yii\framework\test\CWebTestCase.
php on line 11


Call Stack:
    0.0004     326016   1. {main}() C:\wamp\bin\php\php5.3.8\phpunit:0
    0.2333     731432   2. PHPUnit_TextUI_Command::main() C:\wamp\bin\php\php5.3
.8\phpunit:46
    0.2334     731784   3. PHPUnit_TextUI_Command->run() C:\wamp\bin\php\php5.3.
8\pear\PHPUnit\TextUI\Command.php:125
    0.2334     731784   4. PHPUnit_TextUI_Command->handleArguments() C:\wamp\bin
\php\php5.3.8\pear\PHPUnit\TextUI\Command.php:134
    0.3216    1235192   5. PHPUnit_TextUI_Command->handleBootstrap() C:\wamp\bin
\php\php5.3.8\pear\PHPUnit\TextUI\Command.php:615
    0.3282    1247704   6. PHPUnit_Util_Fileloader::checkAndLoad() C:\wamp\bin\p
hp\php5.3.8\pear\PHPUnit\TextUI\Command.php:833
    0.3300    1247792   7. PHPUnit_Util_Fileloader::load() C:\wamp\bin\php\php5.
3.8\pear\PHPUnit\Util\Fileloader.php:79
    0.3312    1252432   8. include_once('C:\wamp\www\demo\protected\tests\bootst
rap.php') C:\wamp\bin\php\php5.3.8\pear\PHPUnit\Util\Fileloader.php:95
    0.5287    1527000   9. require_once('C:\wamp\www\demo\protected\tests\WebTes
tCase.php') C:\wamp\www\demo\protected\tests\bootstrap.php:8
    0.5289    1527648  10. YiiBase::autoload() C:\wamp\www\demo\protected\tests\
bootstrap.php:0
    0.5471    1550384  11. include('C:\wamp\www\yii\framework\test\CWebTestCase.
php') C:\wamp\www\yii\framework\YiiBase.php:402

I install Selenium RC follow this article http://geekswithblogs.net/Saqib/archive/2008/01/03/setting-up-selenium-rc-server-in-windows.aspx

1. Download latest Java SE from http://java.sun.com/ and install

2. Download latest version of Selenium RC from and extract

3. Create a folder named Selenium at C:\Program
Files\Java\jdk1.6.0_03\bin

4. Copy all files under Selenium-server-0.9.2 which you will find in
the extracted folder and paste in the newly created folder

5. From Command prompt run the following commands:

cd \ 
cd C:\PROGRA~1\Java\jdk1.6.0_03\bin
java -jar .\Selenium\selenium-server.jar -interactive

Answers


This worked for me(in Ubuntu),

pear install phpunit/phpunit_selenium

then Restart the server. Hope this work for you in Win7 too.


Need Your Help

Expand circle on hover keeping the background centered?

html css

I'm trying to enlarge a circular element on hover to show more of the background.

Error with post hoc tests in ANCOVA with factorial design

r factorial posthoc

Does anyone know how to do post hoc tests in an ANCOVA model with a factorial design?