It's a mess,
at first I thought it works, but now I have the problem, that the
session is killed if the tests runs without errors and reaches the
tearDown-function. Here is the short test:
----
<?php
require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
class test_short extends PHPUnit_Extensions_SeleniumTestCase
{
protected $autoStop = FALSE;
public function setUp()
{
print ("setup\n");
$this->setBrowser("*firefox c:/Program Files/firefox.exe");
$this->setBrowserUrl("
http://localhost/");
}
function testshort()
{
$this->open("/phpLogin.php");
$this->waitForPageToLoad("30000");
print ("before test\n");
$this->assertTrue($this->isTextPresent("Bitte"));
print ("after test\n");
}
public function tearDown()
{
print ("before tearDown\n");
$this->open("/ADMINISTRATION/index.php");
$this->waitForPageToLoad("30000");
print ("after tearDown\n");
}
}
?>
If the assertTrue fails, the test goes to the tearDown and calls the
URL, but if the assertTrue is true, the test seems to kill the session
and the firefox and after that tries to call the URL. So I get the
error about SessionID. How can I induce the test to call the
tearDown()-function without killing the test. Perhaps the AutoStop-
Parameter is not set correct?
Regards
Jürgen
On 18 Aug., 11:49, Jürgen Clemens <
juergen.clem...@googlemail.com>