繁体   English   中英

测试多个浏览器PHPUnit硒停止

[英]Test multiple browsers PHPUnit selenium stops

我的多个浏览器测试PHPUnit时出错。 当我启动测试时,当我遇到qn错误时测试将停止……但是我希望测试结束。 我怎样才能做到这一点? 请。 我尝试制作“ try-catch”,但是什么都没有...:s

我的课 :

class Alltest extends PHPUnit_Extensions_SeleniumTestCase
{

public static $browsers = array(
array(
    'name'    => 'Firefox',
    'browser' => '*firefox',
    'port'    => 4444,
    'timeout' => 50000,
  ),
array(
    'name'    => 'IExplorer',
    'browser' => '*iexploreproxy',
    'port'    => 4444,
    'timeout' => 50000,
  ),
array(
    'name'    => 'Chrome',
    'browser' => '*googlechrome C:\Program Files\Google\Chrome\Application\chrome.exe',
    'port'    => 4444,
    'timeout' => 50000,
  )
);


 public function setUp(){
 $this->setBrowserUrl(URL);
}


public function testAll(){

$this->windowMaximize();

echo "test all...";
$test = new testRegistration();
$test->Registration($this, $report);
$tabTest["reg"] = "'".$nbTestok . "/" . $nbTest;
    login($this, $report);
$test = new CreatQuest();
$test->create_questions($this, $report);
$tabTest["crea"] = "'".$nbTestok . "/" . $nbTest;
$test = new testDesign();
$test->Design($this, $report);
$tabTest["design"] = "'".$nbTestok . "/" . $nbTest;
$test = new testLocalisation();
$test->Localisation($this, $report);
$tabTest["local"] = "'".$nbTestok . "/" . $nbTest;
$test = new testAnalyse();
$test->Analyse($this, $report);
$tabTest["analyse"] = "'".$nbTestok . "/" . $nbTest;
$test = new accountTest();
$test->testAccount($this, $report);
$tabTest["cfgcompte"] = "'".$nbTestok . "/" . $nbTest;
}

}

使用php assertEqual并确保不要使用verify任何内容。 (我没有进入php tests命令)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM