fail count
This commit is contained in:
parent
1d2ca239e7
commit
afc4c618f4
@ -7,7 +7,7 @@ final class Poster{
|
||||
|
||||
private $report;
|
||||
private $level=0;
|
||||
private $total_fail=0;
|
||||
private $failCount=0;
|
||||
|
||||
function __construct($xml_path){
|
||||
$this->xml = simplexml_load_file($xml_path);
|
||||
@ -23,13 +23,17 @@ final class Poster{
|
||||
// create the issue
|
||||
if(trim($this->report)){
|
||||
$issue=$this->repo->createIssue([
|
||||
'title'=>"$title ({$this->total_fail} fail)",
|
||||
'title'=>"$title ({$this->failCount} fail)",
|
||||
'body'=>$this->report
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getFailCount(){
|
||||
return $this->failCount;
|
||||
}
|
||||
|
||||
private function process($item){
|
||||
$this->level++;
|
||||
if(isset($item->testcase)){
|
||||
@ -41,7 +45,7 @@ final class Poster{
|
||||
if(trim($v)) $failmsg.="```plain\n$v\n```\n";
|
||||
}
|
||||
if($failmsg){
|
||||
$this->total_fail++;
|
||||
$this->failCount++;
|
||||
$this->report.=" * [ ] {$att->name[0]} $failmsg\n";
|
||||
}else{
|
||||
$this->report.=" * [x] {$att->name[0]}\n";
|
||||
|
Loading…
Reference in New Issue
Block a user