Package org.testng

Examples of org.testng.ISuiteResult


      Map<String, ISuiteResult> yellowResults = Maps.newHashMap();
      Map<String, ISuiteResult> greenResults = Maps.newHashMap();
     
      for (Map.Entry<String, ISuiteResult> entry : suiteResults.entrySet()) {
        String suiteName = entry.getKey();
        ISuiteResult sr = entry.getValue();
        ITestContext tc = sr.getTestContext();
        int failed = tc.getFailedTests().size();
        int skipped = tc.getSkippedTests().size();
        int passed = tc.getPassedTests().size();
       
        if (failed > 0) {
          redResults.put(suiteName, sr);
        }
        else if (skipped > 0) {
          yellowResults.put(suiteName, sr);
        }
        else if (passed > 0) {
          greenResults.put(suiteName, sr);
        }
        else {
          redResults.put(suiteName, sr);
        }
      }
 
     
      ISuiteResult[][] results = new ISuiteResult[][] {
        sortResults(redResults.values()), sortResults(yellowResults.values()), sortResults(greenResults.values())
      };
     
      String[] colors = {"failed", "skipped", "passed"};
      for (int i = 0; i < colors.length; i++) {
        ISuiteResult[] r = results[i];
        for (ISuiteResult sr: r) {
          String suiteName = sr.getTestContext().getName();
          generateSuiteResult(suiteName, sr, colors[i], tableOfContents, m_outputDirectory);
        }
      }
   
    tableOfContents.append("</body></html>");
View Full Code Here

TOP

Related Classes of org.testng.ISuiteResult

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.