Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Cant get PHPUnit and selenium working correctly

$
0
0
Hopefully someone will be able to help me with this because I've been pulling my hair out for hours on this one...

Background:
I am reading the Agile Web Application Development Book and I'm up to the part about testing. In this book they recommend installing Selenium and PHPUnit
I have successfully installed Selenium R C
I'm running WAMP server 2.0 on Windows Vista

Problem:
I have tried to install PHPUnit 2 ways.

1. The first way was through PEAR. PEAR managed to download it and install it okay...but when I try to run phpunit I get the following error message.

'phpunit' is not recognized as an internal or external command, operable program or batch file.


As far as I can tell this means that the phpunit executable file does not exist in my PATH environment variable. Trouble is, I cant find ANY phpunit executable file. It just doesn't seem to exist...

2. So I tried another way of installing it. I downloaded directly from GITHUB and extracted the archive to my computer. This time, I had more luck, I can get phpunit running (ie: There is an executable) but when I run it on a test case I get these error messages...

The command I ran
c:\wamp\www\yii\agile\protected\tests>phpunit functional/SiteTest.php

The error message
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

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
PHP Fatal error:  require_once(): Failed opening required 'PHPUnit/Extensions/Se
leniumTestCase.php' (include_path='C:\wamp\bin\php\php5.3.0\PEAR;.;C:\wamp\bin\p
hp\php5.3.0\pear') in C:\wamp\www\yii\framework\test\CWebTestCase.php on line 11


Fatal error: require_once(): Failed opening required 'PHPUnit/Extensions/Seleniu
mTestCase.php' (include_path='C:\wamp\bin\php\php5.3.0\PEAR;.;C:\wamp\bin\php\ph
p5.3.0\pear') in C:\wamp\www\yii\framework\test\CWebTestCase.php on line 11


I have tried searching for that file (ie:SeleniumTestCase.php) on the net but can barely find any information on it. I can't find it on my HD so where do I get a copy of it?

Does anyone know how to fix this problem? I'm completely stumped and I would be so grateful if someone could help me out.

Thanks heaps
Tom

Viewing all articles
Browse latest Browse all 18717

Trending Articles