Search in sources :

Example 1 with IResultMap

use of org.testng.IResultMap in project powermock by powermock.

the class GitHub647 method assertOneTestSkipped.

private void assertOneTestSkipped() {
    IResultMap skippedTests = tla.getTestContexts().get(0).getSkippedTests();
    assertEquals(1, skippedTests.size());
}
Also used : IResultMap(org.testng.IResultMap)

Example 2 with IResultMap

use of org.testng.IResultMap in project arrow by NetEase.

the class PowerEmailableReporter method getAllTestIds.

/**
	 * Get All tests id by class + method + parameters hash code.
	 * @param context
	 * @param suite
	 * @author kevinkong
	 */
private void getAllTestIds(ITestContext context, ISuite suite) {
    IResultMap passTests = context.getPassedTests();
    IResultMap failTests = context.getFailedTests();
    List<IInvokedMethod> invokedMethods = suite.getAllInvokedMethods();
    for (IInvokedMethod im : invokedMethods) {
        if (passTests.getAllMethods().contains(im.getTestMethod()) || failTests.getAllMethods().contains(im.getTestMethod())) {
            int testId = getId(im.getTestResult());
            // m_out.println("ALLtestid=" + testId);
            allRunTestIds.add(testId);
        }
    }
}
Also used : IResultMap(org.testng.IResultMap) IInvokedMethod(org.testng.IInvokedMethod)

Aggregations

IResultMap (org.testng.IResultMap)2 IInvokedMethod (org.testng.IInvokedMethod)1