* @param listener
*/
private void createTestReport() {
log.info("从TestNG监听器中获取任务执行的用例信息");
ArrayList<TngCount> testCountList=new ArrayList<TngCount>();;
TngCount tngCount=new TngCount();
tngCount.setName(getTaskName());
tngCount.setFailed(this.listener.getFailedTests().size());
tngCount.setPassed(this.listener.getPassedTests().size());
tngCount.setSkipped(this.listener.getSkippedTests().size());
this.testReport.setTngSuiteCount(tngCount);
List<ITestContext> testContextList=this.listener.getTestContexts();
for (int i = 0; i < testContextList.size(); i++) {
tngCount=new TngCount();
tngCount.setName(testContextList.get(i).getName());
tngCount.setSuiteName(testContextList.get(i).getSuite().getName());
tngCount.setFailed(testContextList.get(i).getFailedTests().size());
tngCount.setPassed(testContextList.get(i).getPassedTests().size());
tngCount.setSkipped(testContextList.get(i).getSkippedTests().size());
testCountList.add(tngCount);
}
this.testReport .setTaskName(getTaskName());
this.testReport .setTngTestCountList(testCountList);