Class FileParameters

java.lang.Object
com.sun.javatest.BasicParameters
com.sun.javatest.FileParameters
All Implemented Interfaces:
Parameters, Parameters.ConcurrencyParameters, Parameters.EnvParameters, Parameters.ExcludeListParameters, Parameters.KeywordsParameters, Parameters.LegacyEnvParameters, Parameters.MutableConcurrencyParameters, Parameters.MutableExcludeListParameters, Parameters.MutableKeywordsParameters, Parameters.MutablePriorStatusParameters, Parameters.MutableTestsParameters, Parameters.MutableTimeoutFactorParameters, Parameters.PriorStatusParameters, Parameters.TestsParameters, Parameters.TimeoutFactorParameters

public class FileParameters extends BasicParameters implements Parameters.LegacyEnvParameters
An implementation of Parameters, using data read from a .jtp file.
  • Constructor Details

    • FileParameters

      public FileParameters()
      Create an empty FileParameters object.
    • FileParameters

      public FileParameters(File file) throws FileNotFoundException, IOException
      Create a FileParameters object, based on data read from a parameter file.
      Parameters:
      file - the file to be read to initialize this object
      Throws:
      FileNotFoundException - if the file does not exist
      IOException - if there is a problem reading the file
    • FileParameters

      public FileParameters(String... args)
      Create a FileParameters object, based on command-line-like args. The args that are accepted are:
      -t testsuite
      -testsuite testsuite
      Specify the test suite
      -keywords expr
      Specify a keyword expression, used to filter the tests to be run.
      -status status-list
      Specify the status values used to select tests at runtime. status-list should be a comma-separated list of words from the following list: passed, failed, error, notRun
      -exclude exclude-list-file
      Specify an exclude-list file containing a list of tests to be excluded from the test run. The option can be specified more than once, with different files.
      -envFile environment-file
      Specify an environment file, containing environment entries providing details on how to run tests. The option can be specified more than once, with different files.
      -env environment-name
      Specify the name of the environment to be used from the set of environment files.
      -concurrency number
      Specify how many tests JT Harness may run at once. The default is 1.
      -timeoutFactor number
      Specify a scale factor to be used to multiply the timeout value for each test, to allow for running on slow CPUs.
      -report report-dir
      -r report-dir
      Specify a directory in which to write reports at the end of the test run.
      -workDir work-dir
      -w work-dir
      Specify a directory in which to write the results of the individual tests.
      initial-files
      Trailing file arguments are treated as initial files, used to select which parts of the test suite should be run.
      The test suite, work directory and report directory are evaluated relative to the user's current directory, unless the location specified is an absolute path. The exclude list and environment files are located relative to the test suite location, unless they are absolute paths.
      Parameters:
      args - The args used to initialize the FileParameters object.
      Throws:
      IllegalArgumentException - If an unrecognized argument is found.
  • Method Details