phpunit-selenium
phpunit-selenium copied to clipboard
markTestSkipped() & markTestIncomplete()
This functions not working properly......in some cases the return values are incorrect.
if i use the capture screenshot function, then come this error
protected $captureScreenshotOnFailure = TRUE;
protected $screenshotPath = 'path/to/dir';
protected $screenshotUrl = 'path/to/dir';
PHPUnit returns an Error (E), instead of being skipped (S) or Incomplemented (I) test marking, but if i give any error messages, eg.: markTestIncomplete ("Incomplete message"), it appears when returns E
(PHPUnit 3.6.10 & PHPUnit_Selenium 1.2.6 & PHP 5.4.1)
#Incomplete test case message# printed with $this->markTestIncomplete("#Incomplete test case message#");
PHPUnit 3.6.10 by Sebastian Bergmann.
Starting test 'CentralAdmin::testLogin_ with data set #0 ('szabo.jozsef@****.com', '*****')'.
.
Starting test 'CentralAdmin::testSellerSettings_ with data set #0 ('szabo.jozsef@****.com', ''*****')'.
E
Starting test 'CentralAdmin::testWeeklyChanges_ with data set #0 ('szabo.jozsef@****.com', '*****')'.
.
Starting test 'CentralAdmin::testCleanConfigCache_'.
.
Time: 42 seconds, Memory: 4.25Mb
There was 1 error:
1) CentralAdmin::testSellerSettings_ with data set #0 ('szabo.jozsef@*****.com', '******')
Current URL: http://*******.com/admin/SellerSettings
Screenshot: /home/szaboj/*****/UnitTest/*******/screenShots/65af1278282d2205490ff36339887008.png
#Incomplete test case message#
This is a recurring problem with screenshots: to include the screenshot path in the exception, we have to throw a new one, which is generically chosen as an error. If you want to propose a fix, the problem is in SeleniumTestCase::onNotSuccessfulTest().