Package org.testng

Class SuiteRunnerWorker

java.lang.Object
org.testng.SuiteRunnerWorker
All Implemented Interfaces:
Comparable<IWorker<ISuite>>, Runnable, IWorker<ISuite>

public class SuiteRunnerWorker extends Object implements IWorker<ISuite>
An IWorker that is used to encapsulate and run Suite Runners
  • Field Details

  • Constructor Details

    • SuiteRunnerWorker

      public SuiteRunnerWorker(ISuite suiteRunner, SuiteRunnerMap suiteRunnerMap, int verbose, String defaultSuiteName)
  • Method Details

    • runSuite

      private void runSuite(SuiteRunnerMap suiteRunnerMap, XmlSuite xmlSuite)
      Runs a suite
      Parameters:
      suiteRunnerMap - map of suiteRunners that are updated with test results
      xmlSuite - XML suites to run
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • compareTo

      public int compareTo(@Nonnull IWorker<ISuite> arg0)
      Specified by:
      compareTo in interface Comparable<IWorker<ISuite>>
    • getTasks

      public List<ISuite> getTasks()
      Specified by:
      getTasks in interface IWorker<ISuite>
      Returns:
      list of tasks this worker is working on.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getTimeOut

      public long getTimeOut()
      Specified by:
      getTimeOut in interface IWorker<ISuite>
      Returns:
      the maximum time allowed for the worker to complete the task.
    • getPriority

      public int getPriority()
      Specified by:
      getPriority in interface IWorker<ISuite>
      Returns:
      the priority of this task.