Yii Framework Forum: Latest PHPUnit-3.6.10 and Selenium server issue - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Latest PHPUnit-3.6.10 and Selenium server issue Rate Topic: ***** 1 Votes

#1 User is offline   hnam 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 49
  • Joined: 19-September 10
  • Location:BSP

Posted 29 February 2012 - 05:17 AM

If you are recentaly updated your PHPUnit to PHPUnit-3.6.10, you may face a issue with selenium functional testing using selenium server, because of unavailability of PHPUnit selenium package.

Errors will look like following:-

C:\xampp\htdocs\witt\protected\tests>phpunit functional/SiteTest.php

Warning: include(PHPUnit_Extensions_SeleniumTestCase_Driver.php): failed to open stream: No such file or directory in C:\xampp\htdocs\yii\framework\YiiBase.php on line 418

Warning: include(): Failed opening 'PHPUnit_Extensions_SeleniumTestCase_Driver.php' for inclusion (include_path='.;C:\xampp\htdocs\witt\protected\components;C:\xampp\htdocs\witt\protected\models;C:\xampp\php\PEAR') in C:\xampp\htdocs\yii\framework\YiiBase.php on line 418

Fatal error: Class 'PHPUnit_Extensions_SeleniumTestCase_Driver' not found in C:\xampp\php\PEAR\PHPUnit\Extensions\SeleniumTestCase.php on line 602

To resolve above issue you have to install PHPUnit_Selenium package manually after this it will be solved.

Steps to install all:-

1. cd c:\xampp\php

2. C:\xampp\php>pear upgrade pear

3. C:\xampp\php>pear install --alldeps phpunit/PHPUnit

4. C:\xampp\php>PEAR install phpunit/DbUnit

5. Open "php.in" (C:\xampp\php) and uncomment "extension=php_curl.dll"

6. C:\xampp\php>pear install phpunit/PHPUnit_Selenium


you have done all now test your application without any issue:-

1.%root of selenium server%> java -jar selenium-server-standalone-2.20.0.jar

2. %root of test folder in yii application%>phpunit functional/SiteTest.php
On revolutions !
1

#2 User is offline   za_al 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 53
  • Joined: 06-March 12

Posted 15 April 2012 - 02:50 AM

hi

tanks for usefull post.

I'm done step by step instructions.and I have added all the necessary path in my windows enviroment variables and my php.ini file.by following instruction:

On Windows 7 it will be: 1) My Computer -> Right click -> Properties 2) Advanced System Settings 3) Click "Environment variables" button 4) Find "Path" entry in "System variable" section and: a) add to the end ";C:\PHP" (without quotes) or B) add to the front "C:\PHP;"


but when I going to execute following command,I got following error:

Quote

'phpunit' is not recognized as a
operable program or batch file.
:-[

I'm pass this error with copy the phpunit.bat in(C:\xampp\php) to system32 folder( C:\Windows\System32 ) and it work. ;D

tip for install pear:
if some of problem accure during install.for install again is beter to delete pear folder in following path :
C:\Users\UserName\AppData\Local\Temp\

you can following step too:
1. cd c:\xampp\php
2. C:\xampp\php>pear upgrade
3. C:\xampp\php>pear update-channels
4. C:\xampp\php>pear channel-discover pear.symfony-project.com
5. C:\xampp\php>pear install symfony/pake
6. C:\xampp\php>pear install symfony/symfony
7. C:\xampp\php>pear install symfony/YAML
8. C:\xampp\php>pear install symfony/EventDispatcher
9. C:\xampp\php>pear channel-discover components.ez.no
10. C:\xampp\php>pear install -a ezc/eZComponents
11. C:\xampp\php>pear install phpunit/PHPUnit

12.C:\xampp\php>PEAR install phpunit/DbUnit
13.Open "php.in" (C:\xampp\php) and uncomment "extension=php_curl.dll"
14. C:\xampp\php>pear install phpunit/PHPUnit_Selenium

About selenium did not work.But the book's instructions for continued testing by selenium does not matter and phpunit test is sufficient to continue.
0

#3 User is offline   SebK 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 40
  • Joined: 19-April 12

Posted 14 May 2012 - 05:31 AM

Thanks a lot! No idea how I was ever going to find this out by myself.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users