2017-01-10 12 views

答えて

3
import com.relevantcodes.extentreports.ExtentReports; 
import com.relevantcodes.extentreports.ExtentTest; 
import com.relevantcodes.extentreports.LogStatus; 

def failedTestCase = 0; 
def extent = new ExtentReports("C:\\SampleReport.html",true) 
runner.results.each { 
    testCaseResult -> def name = testCaseResult.testCase.name 
    def extentTest = extent.startTest(name, name) 
    if(testCaseResult.status.toString() == 'FAILED'){ 
    failedTestCase++ 
    extentTest.log(LogStatus.FAIL, testCaseResult.testCase.name) 
    } else { 
    extentTest.log(LogStatus.PASS, testCaseResult.testCase.name) 
    } 

} 
関連する問題