Testing the application with functional tests

I’ve ran into the following error when doing the function test on Chapter 5, Page 140


PHPUnit 3.6.3 by Sebastian Bergmann.


Configuration read from ***


F.


Time: 01:02, Memory: 5.75Mb


There was 1 failure:


1) CheckAllWidgetTest::testWidget

Current URL: 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?


Failed asserting that two strings are equal.--- Expected

+++ Actual

@@ @@

-'Check all'

+'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?'


--- Expected

+++ Actual

@@ @@

-'Check all'

+'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?'




FAILURES!

Tests: 2, Assertions: 6, Failures: 1.



Running Fedora 16 so don’t have Internet Explorer (not sure if this matters). The reply of this Yii forum post did help: Error in running functional test

Edit: on a side note, at page 138, the lazy coders may replace


<?php echo CHtml::checkBox('test1', true)?>

<?php echo CHtml::checkBox('test2', false)?>

<?php echo CHtml::checkBox('test3', true)?>

<?php echo CHtml::checkBox('test4', false)?>

<?php echo CHtml::checkBox('test5', true)?>

<?php echo CHtml::checkBox('test6', true)?>

with


for($i = 0; $i < 6; $i++)

  echo CHtml::checkBox('test' . $i, $i % 2 == 0);

The error is about correct selenium configuration. In your case you’ve configured it in runtime. You can use XML config that’s under test directory of your application as well.