Class WebServer

java.lang.Object
com.sun.ts.tests.common.web.WebServer

public class WebServer extends Object
Facade class to ease client access to a TS test deployed in the Web container. Shield clients from underlying TS and HTPP indiosyncrasies.
  • Field Details

  • Method Details

    • newInstance

      public static WebServer newInstance(Properties props) throws IllegalArgumentException
      Factory method to build a WebServer object from TS props parsing relevant properties.
      Throws:
      IllegalArgumentException
    • test

      public boolean test(String webFile, String testName)
      Call test 'testName' in web component deployed as 'webFile'.
      Parameters:
      webFile - file component (see java.net.URL) of the url the web component mapped to.
      testName - Name of the test to run in this web component.
      Returns:
      true if test pass. false otherwise.
    • call

      public Properties call(String webFile, String testName, Properties args) throws IllegalArgumentException
      Call test 'testName' in web component deployed as 'webFile', passing 'args' as input parameters.
      Parameters:
      webFile - file component (see java.net.URL) of the url the web component mapped to.
      testName - Name of the test to run in this web component.
      args - input parameters in a Properties object. This object need at least to have valid TS harness logging properties;
      Returns:
      output parameters in a Properties object. Return null if a problem occured or test failed.
      Throws:
      IllegalArgumentException
    • printConfigError

      protected static void printConfigError(String msg)
      Convenience method to print TS configuration error messages