Package org.testng.internal

Examples of org.testng.internal.ResultMap


    results.put("passed", testContext.getPassedTests());
    results.put("failed", testContext.getFailedTests());
    results.put("failedBut", testContext.getFailedButWithinSuccessPercentageTests());
    results.put("skipped", testContext.getSkippedTests());
   
    ResultMap total = new ResultMap();
   
    addAll( total, results.get("passed") );
    addAll( total, results.get("failed") );
    addAll( total, results.get("failedBut") );
    addAll( total, results.get("skipped") );
   
    List<ITestResult> testNGTestResults = new ArrayList<ITestResult>(total.getAllResults() );
    Collections.sort(testNGTestResults, EXECUTION_DATE_COMPARATOR);
   
    return testNGTestResults;
  }
View Full Code Here


    results.put("passed", testContext.getPassedTests());
    results.put("failed", testContext.getFailedTests());
    results.put("failedBut", testContext.getFailedButWithinSuccessPercentageTests());
    results.put("skipped", testContext.getSkippedTests());
   
    ResultMap total = new ResultMap();
   
    addAll( total, results.get("passed") );
    addAll( total, results.get("failed") );
    addAll( total, results.get("failedBut") );
    addAll( total, results.get("skipped") );
   
    List<ITestResult> testNGTestResults = new ArrayList<ITestResult>(total.getAllResults() );
    Collections.sort(testNGTestResults, EXECUTION_DATE_COMPARATOR);
   
    return testNGTestResults;
  }
View Full Code Here

    results.put("passed", testContext.getPassedTests());
    results.put("failed", testContext.getFailedTests());
    results.put("failedBut", testContext.getFailedButWithinSuccessPercentageTests());
    results.put("skipped", testContext.getSkippedTests());
   
    ResultMap total = new ResultMap();
   
    addAll( total, results.get("passed") );
    addAll( total, results.get("failed") );
    addAll( total, results.get("failedBut") );
    addAll( total, results.get("skipped") );
   
    List<ITestResult> testNGTestResults = new ArrayList<ITestResult>(total.getAllResults() );
    Collections.sort(testNGTestResults, EXECUTION_DATE_COMPARATOR);
   
    return testNGTestResults;
  }
View Full Code Here

    results.put("passed", testContext.getPassedTests());
    results.put("failed", testContext.getFailedTests());
    results.put("failedBut", testContext.getFailedButWithinSuccessPercentageTests());
    results.put("skipped", testContext.getSkippedTests());
   
    ResultMap total = new ResultMap();
   
    addAll( total, results.get("passed") );
    addAll( total, results.get("failed") );
    addAll( total, results.get("failedBut") );
    addAll( total, results.get("skipped") );
   
    ITestNGMethod[] allMethodsInCtx = testContext.getAllTestMethods();
    for (int i = 0; i < allMethodsInCtx.length; i++)
    {
      ITestNGMethod methodInCtx = allMethodsInCtx [ i ];
     
      Collection<ITestNGMethod> allMethodsFound = total.getAllMethods();
      boolean exists = false;
      for( ITestNGMethod methodFound : allMethodsFound )
      {
        if ( methodInCtx.getTestClass().getName().equals(methodFound.getTestClass().getName()))
        {
          if ( methodInCtx.getMethod().getName().equals(methodFound.getMethod().getName()))
          {
            exists = true;
          }
        }
      }
      if ( ! exists )
      {
        ITestResult skippedTestResult =
          new org.testng.internal.TestResult(methodInCtx.getTestClass(), methodInCtx.getInstances(), methodInCtx, null, testContext.getStartDate().getTime(), testContext.getEndDate().getTime());
        skippedTestResult.setStatus(ITestResult.SKIP);
        total.addResult(skippedTestResult, methodInCtx);
      }
    }
   
    List<ITestResult> testNGTestResults = new ArrayList<ITestResult>(total.getAllResults() );
    Collections.sort(testNGTestResults, EXECUTION_DATE_COMPARATOR);
   
    return testNGTestResults;
  }
View Full Code Here

TOP

Related Classes of org.testng.internal.ResultMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.