当前位置: 首页>>代码示例>>Java>>正文


Java IResultMap.getAllResults方法代码示例

本文整理汇总了Java中org.testng.IResultMap.getAllResults方法的典型用法代码示例。如果您正苦于以下问题:Java IResultMap.getAllResults方法的具体用法?Java IResultMap.getAllResults怎么用?Java IResultMap.getAllResults使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.testng.IResultMap的用法示例。


在下文中一共展示了IResultMap.getAllResults方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: resultDetail

import org.testng.IResultMap; //导入方法依赖的package包/类
private void resultDetail(IResultMap tests) {
	for (ITestResult result : tests.getAllResults()) {
		ITestNGMethod method = result.getMethod();

		int methodId = getId(result);

		String cname = method.getTestClass().getName();
		m_out.println("<h2 id=\"m" + methodId + "\" name=\"m" + methodId + "\" >" + cname + ":"
				+ method.getMethodName() + "</h2>");
		Set<ITestResult> resultSet = tests.getResults(method);
		generateForResult(result, method, resultSet.size());
		m_out.println("<p class=\"totop\"><a href=\"#summary\">back to summary</a></p>");

	}
}
 
开发者ID:quanqinle,项目名称:WebAndAppUITesting,代码行数:16,代码来源:PowerEmailableReporter.java

示例2: resultDetail

import org.testng.IResultMap; //导入方法依赖的package包/类
private void resultDetail(IResultMap tests) {
	for (ITestResult result : tests.getAllResults()) {
		ITestNGMethod method = result.getMethod();

		int methodId = getId(result);
		
		String cname = method.getTestClass().getName();
		m_out.println("<h2 id=\"m" + methodId + "\" name=\"m" + methodId + "\" >" + cname + ":" + method.getMethodName() + "</h2>");
		Set<ITestResult> resultSet = tests.getResults(method);
		generateForResult(result, method, resultSet.size());
		m_out.println("<p class=\"totop\"><a href=\"#summary\">back to summary</a></p>");

	}
}
 
开发者ID:HarrisChu,项目名称:webUIAuto,代码行数:15,代码来源:PowerEmailableReporter.java

示例3: hasFailedBefore

import org.testng.IResultMap; //导入方法依赖的package包/类
private boolean hasFailedBefore(IResultMap failureList, ITestResult passedResult) {
  for (ITestResult result : failureList.getAllResults()) {
    String failedTest =
        result.getMethod().getRealClass().toString()+ "." + result.getMethod().getMethodName();
    String passedTest = passedResult.getMethod().getRealClass().toString() + "." +
        passedResult.getMethod().getMethodName();
    
    if (failedTest.equals(passedTest) && methodParameterEqual(result, passedResult)) {
      return true;
    }
  }
  return false;
}
 
开发者ID:web-auto,项目名称:wtf-core,代码行数:14,代码来源:BaseListener.java

示例4: listTestResult

import org.testng.IResultMap; //导入方法依赖的package包/类
private ArrayList<ITestResult> listTestResult(IResultMap resultMap){
	Set<ITestResult> results = resultMap.getAllResults();
	return new ArrayList<ITestResult>(results);
}
 
开发者ID:zhengshuheng,项目名称:PatatiumWebUi,代码行数:5,代码来源:TestReport.java

示例5: listTestResult

import org.testng.IResultMap; //导入方法依赖的package包/类
private ArrayList<ITestResult> listTestResult(IResultMap resultMap){
    Set<ITestResult> results = resultMap.getAllResults();    
    return new ArrayList<ITestResult>(results);
}
 
开发者ID:pcsh,项目名称:cashion,代码行数:5,代码来源:IReporterNewReport.java

示例6: processTestResults

import org.testng.IResultMap; //导入方法依赖的package包/类
/**
 * Creates EARL statements from the given test results. A test result is
 * described by an Assertion resource. The TestResult and TestCase resources
 * are linked to the Assertion in accord with the EARL schema; the latter is
 * also linked to a TestRequirement.
 * 
 * @param earl
 *            An RDF Model containing EARL statements.
 * @param results
 *            The results of invoking a collection of test methods.
 */
void processTestResults(Model earl, IResultMap results) {
    for (ITestResult tngResult : results.getAllResults()) {
        // create earl:Assertion
        long endTime = tngResult.getEndMillis();
        GregorianCalendar calTime = new GregorianCalendar(TimeZone.getDefault());
        calTime.setTimeInMillis(endTime);
        Resource assertion = earl.createResource("assert-" + ++this.resultCount,
                EARL.Assertion);
        assertion.addProperty(EARL.mode, EARL.AutomaticMode);
        assertion.addProperty(EARL.assertedBy, this.assertor);
        assertion.addProperty(EARL.subject, this.testSubject);
        // link earl:TestResult to earl:Assertion
        Resource earlResult = earl.createResource("result-" + this.resultCount,
                EARL.TestResult);
        earlResult.addProperty(DCTerms.date, earl.createTypedLiteral(calTime));
        switch (tngResult.getStatus()) {
        case ITestResult.FAILURE:
            earlResult.addProperty(DCTerms.description, getDetailMessage(tngResult));
            if (AssertionError.class.isInstance(tngResult.getThrowable())) {
                earlResult.addProperty(EARL.outcome, EARL.Fail);
            } else { // an exception occurred
                earlResult.addProperty(EARL.outcome, EARL.CannotTell);
            }
            processResultAttributes(earlResult, tngResult);
            break;
        case ITestResult.SKIP:
            earlResult.addProperty(DCTerms.description, getDetailMessage(tngResult));
            earlResult.addProperty(EARL.outcome, EARL.NotTested);
            break;
        default:
            earlResult.addProperty(EARL.outcome, EARL.Pass);
            break;
        }
        assertion.addProperty(EARL.result, earlResult);
        // link earl:TestCase to earl:Assertion and earl:TestRequirement
        String testMethodName = tngResult.getMethod().getMethodName();
        String testClassName = tngResult.getTestClass().getName().replaceAll("\\.", "/");
        StringBuilder testCaseId = new StringBuilder(testClassName);
        testCaseId.append('#').append(testMethodName);
        Resource testCase = earl.createResource(testCaseId.toString(), EARL.TestCase);
        testCase.addProperty(DCTerms.title, breakIntoWords(testMethodName));
        String testDescr = tngResult.getMethod().getDescription();
        if (null != testDescr && !testDescr.isEmpty()) {
            testCase.addProperty(DCTerms.description, testDescr);
        }
        assertion.addProperty(EARL.test, testCase);
        String testReqName = tngResult.getTestContext().getName().replaceAll("\\s", "-");
        earl.createResource(testReqName).addProperty(DCTerms.hasPart, testCase);
    }
}
 
开发者ID:opengeospatial,项目名称:teamengine,代码行数:62,代码来源:EarlReporter.java


注:本文中的org.testng.IResultMap.getAllResults方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。