Class TestSuite

java.lang.Object
jp.vmi.selenium.selenese.TestSuite
All Implemented Interfaces:
IHtmlResultTestSuite, IHtmlResultTestTarget, ITestSuite, ITestTarget, ITreedFileGenerator, Selenese
Direct Known Subclasses:
TestProject

public class TestSuite
extends Object
implements Selenese, ITreedFileGenerator, ITestSuite, IHtmlResultTestSuite
test-suite object for execution.
  • Constructor Details

    • TestSuite

      public TestSuite()
  • Method Details

    • initialize

      public TestSuite initialize​(String filename, String name)
      Initialize after constructed.
      Parameters:
      filename - Selenese script file.
      name - test-case name.
      Returns:
      this.
    • getParent

      public ITreedFileGenerator getParent()
      Description copied from interface: ITreedFileGenerator
      Get parent object.
      Specified by:
      getParent in interface ITreedFileGenerator
      Returns:
      parent object.
    • setParent

      public void setParent​(ITreedFileGenerator parent)
      Description copied from interface: ITreedFileGenerator
      Set parent object.
      Specified by:
      setParent in interface ITreedFileGenerator
      Parameters:
      parent - parent object.
    • getType

      public Selenese.Type getType()
      Description copied from interface: Selenese
      Get script type.
      Specified by:
      getType in interface IHtmlResultTestTarget
      Specified by:
      getType in interface Selenese
      Returns:
      script type.
    • isError

      public boolean isError()
      Description copied from interface: ITestTarget
      Is error instance?
      Specified by:
      isError in interface ITestTarget
      Returns:
      true if this is error instance.
    • getName

      public String getName()
      Description copied from interface: ITestTarget
      Get test-target name.
      Specified by:
      getName in interface IHtmlResultTestTarget
      Specified by:
      getName in interface ITestTarget
      Specified by:
      getName in interface ITreedFileGenerator
      Returns:
      test-target name.
    • getBaseName

      public String getBaseName()
      Description copied from interface: ITestTarget
      Get test-target file base name. For example, return "def" when file name is "/abc/def.html".
      Specified by:
      getBaseName in interface ITestTarget
      Specified by:
      getBaseName in interface ITreedFileGenerator
      Returns:
      test-target file base name.
    • getIndex

      public int getIndex()
      Description copied from interface: ITreedFileGenerator
      Get index of this object in the parent object.
      Specified by:
      getIndex in interface ITreedFileGenerator
      Returns:
      index.
    • setIndex

      public void setIndex​(int index)
      Description copied from interface: ITreedFileGenerator
      Set index of this object in the parent object.
      Specified by:
      setIndex in interface ITreedFileGenerator
      Parameters:
      index - index.
    • getId

      public String getId()
      Description copied from interface: Selenese
      Get id.
      Specified by:
      getId in interface Selenese
      Returns:
      id.
    • setId

      public void setId​(String id)
      Set test-suite id.
      Parameters:
      id - test-suite id.
    • getWebDriverName

      public String getWebDriverName()
      Get WebDriver name.
      Returns:
      WebDriver name.
    • setWebDriverName

      public void setWebDriverName​(String webDriverName)
      Set WebDriver name.
      Parameters:
      webDriverName - WebDriver name.
    • addSelenese

      public void addSelenese​(Selenese selenese)
      Add Selenese (test-suite/test-case) instance.
      Parameters:
      selenese - Selenese instance.
    • addSeleneseFile

      public void addSeleneseFile​(String filename, ICommandFactory commandFactory)
      Add Selenese file. (test-suite or test-case)
      Parameters:
      filename - Selenese file name.
      commandFactory - command factory.
    • getSeleneseList

      public List<Selenese> getSeleneseList()
      Get Selenese list.
      Returns:
      Selenese list.
    • getTestCaseList

      public List<TestCase> getTestCaseList()
      Get Testcases included in TestSuite.
      Returns:
      Testcases list.
    • getStopWatch

      public StopWatch getStopWatch()
      Get stop watch.
      Specified by:
      getStopWatch in interface ITestTarget
      Returns:
      stop watch.
    • getResult

      public Result getResult()
      Description copied from interface: Selenese
      Get selenese result.
      Specified by:
      getResult in interface IHtmlResultTestTarget
      Specified by:
      getResult in interface Selenese
      Returns:
      selenese result.
    • setResult

      public void setResult​(Result result)
      Set selenese result.
      Parameters:
      result - result of test suite.
    • execute

      public Result execute​(Selenese parent, Context context)
      Description copied from interface: Selenese
      Execute script.
      Specified by:
      execute in interface Selenese
      Parameters:
      parent - parent selenese instance or null.
      context - Selenese Runner context.
      Returns:
      result.
    • toStringImpl

      protected String toStringImpl​(String className)
    • toString

      public String toString()
      Overrides:
      toString in class Object