Yii Framework Forum: Error in running functional test - Yii Framework Forum

Jump to content

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

Error in running functional test Error in running functional test Rate Topic: -----

#1 User is offline   ybrunet 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 14
  • Joined: 25-October 11

Posted 03 December 2011 - 01:55 PM

This is the first time I try running functional test case with Selenium RC. I'm getting the following error, have no idea what is means... I'm following SiteTest.php example on blog tutorial.

PHPUnit_Framework_Exception: Result is neither "true" nor "false": 'OR Server Exception: sessionId led to start new browser session: java.lang.RuntimeException: SystemRoot apparently not set! doesn't exist; perhaps this session was already stopped?'

(note: I've tested Selenium RC settings by following simple example from PHPUnit site and it worked fine. I think my yii settings for the test is not correct but don't know where to look.)
0

#2 User is offline   ybrunet 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 14
  • Joined: 25-October 11

Posted 06 December 2011 - 09:52 AM

It is solved.
I added below line to WebTestCase setUp() and it runs without Exception now.

$this->setBrowser('*firefox');

0

#3 User is offline   ybrunet 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 14
  • Joined: 25-October 11

Posted 06 December 2011 - 10:08 AM

When my testcase fails, now I get this error (instead of the line no of failed test.)

Argument 2 passed to PHPUnit_Framework_ExpectationFailedException::__construct() must be an instance of PHPUnit_Framework_ComparisonFailure, string given


Anyone has idea?
0

#4 User is offline   Tropi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 73
  • Joined: 30-November 11

Posted 06 December 2011 - 10:22 AM

Are you using PHPUnit 3.6? Then it's probably related to a bug that recently got fixed. (https://github.com/s...enium/issues/79)
0

#5 User is offline   ybrunet 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 14
  • Joined: 25-October 11

Posted 06 December 2011 - 10:40 AM

Thank you Tropi. That was exactly my problem.
Until the new release comes out, I just changed to remove the 2nd parm of this call:
PHPUnit_Framework_ExpectationFailedException($buffer, $message);
in SeleniumTestCase.php and it runs fine now.
0

#6 User is offline   PHP_KUN 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 14-September 12

Posted 20 February 2013 - 02:18 AM

I so careless that I edit
yii-1.1.13.e9e4a0/framework/cli/views/webapp/protected/tests/WebTestCase.php,but I actually should edit webTest/protected/tests/WebTestCase.php!
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