Examples of ITestNGMethod


Examples of org.testng.ITestNGMethod

  {
    List<ITestResult> testNGTestResults = TestNGTAPUtils.getTestNGResultsOrderedByExecutionDate(resultMap);
   
    for ( ITestResult testResult : testNGTestResults )
    {
      ITestNGMethod method = testResult.getMethod();
     
      List<ITestResult> testResultsForThisMethod = testResultsPerMethod.get( method );
     
      if ( testResultsForThisMethod == null )
      {
        testResultsForThisMethod = new ArrayList<ITestResult>();
        testResultsPerMethod.put(method, testResultsForThisMethod);
      }
      testResultsForThisMethod.add( testResult );
    }
   
   
    Set<ITestNGMethod> keySet = testResultsPerMethod.keySet();
   
    for( ITestNGMethod method : keySet )
    {
      TestSet testSet = new TestSet();
     
      List<ITestResult> testResults = testResultsPerMethod.get( method );
      testSet.setPlan( new Plan(testResults.size()) );
     
      for ( ITestResult testResult : testResults )
      {
        TestResult tapTestResult = TestNGTAPUtils.generateTAPTestResult( testResult, testSet.getNumberOfTestResults()+1 );
        testSet.addTestResult( tapTestResult );
      }

      File output = new File(testContext.getOutputDirectory(), method.getTestClass().getName()+"#"+method.getMethodName()+".tap");
      tapProducer.dump(testSet, output);
   
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.