Selenium, php, phpUnit, 404 error calls testComplete() rather than continue, how do I stop this?
I am using selenium server and phpUnit to run php based tests. My tests are simple, test the page is there, if it loads, has no errors on page and then move on. I have a missing page and rather than say, yep its not there and more on I get:
Time: 16 seconds, Memory: 14.75Mb
There was 1 error:
1) OlympicsSiteMapEnglishPages::testMyTestCase PHPUnit_Framework_Exception: Response from Selenium RC server for testComplete(). XHR ERROR: URL = http://my.url/somepage Response_Code = 404 Error_Message = Not Found.
/some/path/some_file.php:375
FAILURES! Tests: 1, Assertions: 0, Errors: 1.
I really need to figure out how to stop it doing this! I have tried catching the exception like so:
try { $this->open("/rel/url.php", 1); } catch (PHPUnit_Framework_AssertionFailedError $e) { return array_push($this->verificationErrors, $e->toString()); }
Any clues guys, I really need help!
Many thanks,
Alex