Yii Framework Forum: Functional Tests code coverage - Yii Framework Forum

Jump to content

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

Functional Tests code coverage Rate Topic: -----

#1 User is offline   Asterisk Pound 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 18-September 10

Posted 06 April 2012 - 05:19 PM

I had previously set up Selenium and phpunit to where I was not getting any errors, but today as I was trying to get code coverage to work for my selenium (functional) tests, I ended up reinstalling phpunit_selenium and I started getting this
PHP Warning:  include(SiteTest: Firefox.php): failed to open stream: No such file or directory in /home/aasher/Projects/fructose_freedom/framework/YiiBase.php on line 418
PHP Stack trace:
PHP   1. {main}() /usr/bin/phpunit:0
PHP   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:45
PHP   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:130
PHP   4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:192
PHP   5. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/TextUI/TestRunner.php:325
PHP   6. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705
PHP   7. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705
PHP   8. method_exists() /usr/share/php/PHPUnit/Framework/TestSuite.php:654
PHP   9. YiiBase::autoload() /usr/share/php/PHPUnit/Framework/TestSuite.php:0
PHP Warning:  include(): Failed opening 'SiteTest: Firefox.php' for inclusion (include_path='.:/home/aasher/Projects/fructose_freedom/htmldocs/protected/vendors:/home/aasher/Projects/fructose_freedom/htmldocs/protected/components:/home/aasher/Projects/fructose_freedom/htmldocs/protected/models:/usr/share/php:/usr/share/pear') in /home/aasher/Projects/fructose_freedom/framework/YiiBase.php on line 418
PHP Stack trace:
PHP   1. {main}() /usr/bin/phpunit:0
PHP   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:45
PHP   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:130
PHP   4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:192
PHP   5. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/TextUI/TestRunner.php:325
PHP   6. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705
PHP   7. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705
PHP   8. method_exists() /usr/share/php/PHPUnit/Framework/TestSuite.php:654
PHP   9. YiiBase::autoload() /usr/share/php/PHPUnit/Framework/TestSuite.php:0
SSSPHP Warning:  include(SiteTest: Firefox.php): failed to open stream: No such file or directory in /home/aasher/Projects/fructose_freedom/framework/YiiBase.php on line 418
PHP Stack trace:
PHP   1. {main}() /usr/bin/phpunit:0
PHP   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:45
PHP   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:130
PHP   4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:192
PHP   5. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/TextUI/TestRunner.php:325
PHP   6. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705
PHP   7. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705
PHP   8. method_exists() /usr/share/php/PHPUnit/Framework/TestSuite.php:752
PHP   9. YiiBase::autoload() /usr/share/php/PHPUnit/Framework/TestSuite.php:0
PHP Warning:  include(): Failed opening 'SiteTest: Firefox.php' for inclusion (include_path='.:/home/aasher/Projects/fructose_freedom/htmldocs/protected/vendors:/home/aasher/Projects/fructose_freedom/htmldocs/protected/components:/home/aasher/Projects/fructose_freedom/htmldocs/protected/models:/usr/share/php:/usr/share/pear') in /home/aasher/Projects/fructose_freedom/framework/YiiBase.php on line 418
PHP Stack trace:
PHP   1. {main}() /usr/bin/phpunit:0
PHP   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:45
PHP   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:130
PHP   4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:192
PHP   5. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/TextUI/TestRunner.php:325
PHP   6. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705
PHP   7. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705
PHP   8. method_exists() /usr/share/php/PHPUnit/Framework/TestSuite.php:752
PHP   9. YiiBase::autoload() /usr/share/php/PHPUnit/Framework/TestSuite.php:0


Time: 0 seconds, Memory: 10.25Mb


so then. two questions...
why am I getting this error?
and 2: how do I get coverage to actually give me real data about code that was tested during the functional tests..

I have set up my prepend and append in my php.ini and also updated my $GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'] = $_SERVER['DOCUMENT_ROOT'];


what am I missing here?
0

#2 User is offline   Ivica 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 320
  • Joined: 25-May 11

Posted 10 April 2012 - 01:15 AM

Try to update both phpunit and selenium server to recent versions!!!
#Be Limitless
Gravity4
0

#3 User is offline   Asterisk Pound 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 18-September 10

Posted 10 April 2012 - 01:20 AM

I had already installed the latest versions before trying this.

the good news is, the selenium tests run, they just don't report properly about my code coverage.

View PostIvica, on 10 April 2012 - 01:15 AM, said:

Try to update both phpunit and selenium server to recent versions!!!

0

#4 User is offline   Dmitriy K. 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 20-March 12

Posted 12 April 2012 - 05:15 PM

Hey!
Check out my answer here. I had exactly same problem and got rid of this senseless info in command prompt
0

#5 User is offline   andrewpk 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 07-May 12

Posted 08 July 2013 - 12:57 PM

View PostAsterisk Pound, on 10 April 2012 - 01:20 AM, said:

I had already installed the latest versions before trying this.

the good news is, the selenium tests run, they just don't report properly about my code coverage.



Were you able to get code coverage to properly generate? Even with
@coverage
annotation my coverage still isn't happening.
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