com.sun.javatest
Interface Parameters

All Known Implementing Classes:
BasicInterviewParameters, BasicParameters, DefaultInterviewParameters, FileParameters, InterviewParameters, LegacyParameters, SimpleInterviewParameters

public interface Parameters

Configuration parameters for a test run. Methods are provided to access the parameters, and to access objects which contain the permanent representation of the parameters, which is otherwise undefined. Different representations include implementations based on configuration interviews, and on simple files. A default implementation, based on configuration interviews, is available to simplify the task of providing configuration parameters in almost all cases.

Since:
3.0.2

Nested Class Summary
static interface Parameters.ConcurrencyParameters
          An interface providing basic abstract access to an integer specifying the maximum number of tests that can be run in parallel.
static interface Parameters.EnvParameters
          An interface providing basic abstract access to the environment used to run each test.
static interface Parameters.ExcludeListParameters
          An interface providing basic abstract access to an exclude list, defining tests to be excluded from the test run.
static interface Parameters.KeywordsParameters
          An interface providing basic abstract access to a keywords object which can be used to select tests according to their keywords.
static interface Parameters.LegacyEnvParameters
          An interface providing abstract access to environments, as contained in a set of .jte files, as used by older, legacy test suites.
static interface Parameters.MutableConcurrencyParameters
          An interface providing abstract access to an integer specifying the maximum number of tests that can be run in parallel.
static interface Parameters.MutableExcludeListParameters
          An interface providing abstract access to an exclude list, as defined by a set of files, defining tests to be excluded from the test run.
static interface Parameters.MutableKeywordsParameters
          An interface providing abstract access to a keywords object which can be used to select tests according to their keywords.
static interface Parameters.MutablePriorStatusParameters
          An interface providing abstract access to a set of booleans which can be used to select tests according to their prior execution status.
static interface Parameters.MutableTestsParameters
          An interface providing abstract access to a set of paths defining the tests and folders of tests to be run.
static interface Parameters.MutableTimeoutFactorParameters
          An interface providing abstract access to an integer specifying a scale factor for the standard timeout used for each test.
static interface Parameters.PriorStatusParameters
          An interface providing basic abstract access to a set of booleans which can be used to select tests according to their prior execution status.
static interface Parameters.TestsParameters
          An interface providing basic abstract access to the set of paths defining the tests and folders of tests to be run.
static interface Parameters.TimeoutFactorParameters
          An interface providing basic abstract access to an integer specifying a scale factor for the standard timeout used for each test.
 
Method Summary
 int getConcurrency()
          Get an integer specifying the maximum number of tests that may be run in parallel.
 Parameters.ConcurrencyParameters getConcurrencyParameters()
          Get an object which provides access to the integer specifying the maximum number of tests that may be run in parallel.
 TestEnvironment getEnv()
          Get the environment of test-suite-specific configuration values, to be passed to the script used to run each test.
 Parameters.EnvParameters getEnvParameters()
          Get an object which provides access to the environment of test-suite-specific configuration values to be used when each test is run.
 java.lang.String getErrorMessage()
          If there is an error in any of the configuration values, as indicated by isValid, this method will provide a detail message about one or more of the invalid values.
 ExcludeList getExcludeList()
          Get an exclude list which identifies tests or test cases to be excluded from the test run.
 TestFilter getExcludeListFilter()
          Get a filter which will filter tests according to the result of getExcludeList().
 Parameters.ExcludeListParameters getExcludeListParameters()
          Get an object which provides access to the exclude list which identifies tests or test cases to be excluded from the test run.
 TestFilter[] getFilters()
          Get an array of the non-null filters returned from getExcludeListFilter, getKeywordsFilter, getPriorStatusFilter, and getRelevantTestFilter.
 Keywords getKeywords()
          Get a keywords object which identifies tests to be run according to their keywords.
 TestFilter getKeywordsFilter()
          Get a filter which will filter tests according to the result of getKeywords().
 Parameters.KeywordsParameters getKeywordsParameters()
          Get an object which provides access to the keywords object which identifies tests to be run according to their keywords.
 TestFilter getPriorStatusFilter()
          Get a filter which will filter tests according to the result of getPriorStatusValus().
 Parameters.PriorStatusParameters getPriorStatusParameters()
          Get an object which provides access to an array of booleans which identify tests to be run according to their prior execution status.
 boolean[] getPriorStatusValues()
          Get an array of booleans which identify tests to be run according to their prior execution status.
 TestFilter getRelevantTestFilter()
          Get a test-suite specific filter which will filter tests according to test-suite-specific criteria, as perhaps determined by a configuration interview.
 java.lang.String[] getTests()
          Get the paths identifying the tests or folders of tests within the test suite to be run.
 Parameters.TestsParameters getTestsParameters()
          Get an object which provides access to the paths identifying the tests or folders of tests to be run.
 TestSuite getTestSuite()
          Get the test suite for which these parameters apply.
 float getTimeoutFactor()
          Get an integer specifying a scale factor to be applied to the standard timeout for the test.
 Parameters.TimeoutFactorParameters getTimeoutFactorParameters()
          Get an object which provides access to the integer specifying a scale factor to be applied to the standard timeout for the test.
 WorkDirectory getWorkDirectory()
          Get the work directory in which to store the results of the test run.
 boolean isValid()
          Determine whether all the configuration values are valid.
 void setTestSuite(TestSuite ts)
          Set the test suite for which these parameters apply.
 void setWorkDirectory(WorkDirectory wd)
          Set the work directory for which these parameters apply.
 

Method Detail

getTestSuite

TestSuite getTestSuite()
Get the test suite for which these parameters apply.

Returns:
the test suite for which these parameters apply.
See Also:
setTestSuite(com.sun.javatest.TestSuite)

setTestSuite

void setTestSuite(TestSuite ts)
Set the test suite for which these parameters apply.

Parameters:
ts - the test suite for which these parameters apply
See Also:
getTestSuite()

getWorkDirectory

WorkDirectory getWorkDirectory()
Get the work directory in which to store the results of the test run.

Returns:
the work directory in which to store the results of the test run.
See Also:
setWorkDirectory(com.sun.javatest.WorkDirectory)

setWorkDirectory

void setWorkDirectory(WorkDirectory wd)
Set the work directory for which these parameters apply.

Parameters:
wd - the work directory for which these parameters apply
See Also:
getWorkDirectory()

getTests

java.lang.String[] getTests()
Get the paths identifying the tests or folders of tests within the test suite to be run.

Returns:
an array of paths identifying the tests to be run
See Also:
Parameters.TestsParameters.getTests()

getTestsParameters

Parameters.TestsParameters getTestsParameters()
Get an object which provides access to the paths identifying the tests or folders of tests to be run.

Returns:
an object which provides access to the paths identifying tests to be run.

getExcludeList

ExcludeList getExcludeList()
Get an exclude list which identifies tests or test cases to be excluded from the test run.

Returns:
an exclude list identifying tests or test cases to be excluded from the test run.
See Also:
getExcludeListFilter(), Parameters.ExcludeListParameters.getExcludeList()

getExcludeListParameters

Parameters.ExcludeListParameters getExcludeListParameters()
Get an object which provides access to the exclude list which identifies tests or test cases to be excluded from the test run.

Returns:
an object which provides access to the exclude list identifying tests or test cases to be excluded from the test run.

getKeywords

Keywords getKeywords()
Get a keywords object which identifies tests to be run according to their keywords.

Returns:
a keywords object which identifies tests to be run according to their keywords.
See Also:
Parameters.KeywordsParameters.getKeywords()

getKeywordsParameters

Parameters.KeywordsParameters getKeywordsParameters()
Get an object which provides access to the keywords object which identifies tests to be run according to their keywords.

Returns:
an object which provides access to the keywords object which identifies tests to be run according to their keywords.

getPriorStatusValues

boolean[] getPriorStatusValues()
Get an array of booleans which identify tests to be run according to their prior execution status. The array can be indexed by the constants Status.PASSED, Status.FAILED, Status.ERROR, and Status.NOT_RUN. For each of those values, if the corresponding boolean in the array is true, a test will be selected if its status matches the index. If the array is null, all tests will be selected.

Returns:
an array of booleans which identifying tests to be run according to their prior execution status, or null if no such criteria is required.
See Also:
Parameters.PriorStatusParameters.getPriorStatusValues()

getPriorStatusParameters

Parameters.PriorStatusParameters getPriorStatusParameters()
Get an object which provides access to an array of booleans which identify tests to be run according to their prior execution status.

Returns:
an object which provides access to an array of booleans which identify tests to be run according to their prior execution status, or null if no such selection criteria is required.

getEnv

TestEnvironment getEnv()
Get the environment of test-suite-specific configuration values, to be passed to the script used to run each test.

Returns:
an environment to be passed to the script used to run each test.
See Also:
Parameters.EnvParameters.getEnv()

getEnvParameters

Parameters.EnvParameters getEnvParameters()
Get an object which provides access to the environment of test-suite-specific configuration values to be used when each test is run.

Returns:
an object which provides access to the environment to be used when each test is run.

getConcurrency

int getConcurrency()
Get an integer specifying the maximum number of tests that may be run in parallel.

Returns:
an integer specifying the maximum number of tests that may be run in parallel
See Also:
Parameters.ConcurrencyParameters.getConcurrency()

getConcurrencyParameters

Parameters.ConcurrencyParameters getConcurrencyParameters()
Get an object which provides access to the integer specifying the maximum number of tests that may be run in parallel.

Returns:
an object which provides access to the integer specifying the maximum number of tests that may be run in parallel.

getTimeoutFactor

float getTimeoutFactor()
Get an integer specifying a scale factor to be applied to the standard timeout for the test.

Returns:
an integer specifying a scale factor to be applied to the standard timeout for each test.
See Also:
Parameters.TimeoutFactorParameters.getTimeoutFactor()

getTimeoutFactorParameters

Parameters.TimeoutFactorParameters getTimeoutFactorParameters()
Get an object which provides access to the integer specifying a scale factor to be applied to the standard timeout for the test.

Returns:
an object which provides access to the integer specifying a scale factor to be applied to the standard timeout for each test.

getExcludeListFilter

TestFilter getExcludeListFilter()
Get a filter which will filter tests according to the result of getExcludeList(). If the result of getExcludeList is null or an empty exclude list, the result of this method will also be null.

Returns:
a filter which will filter tests according to the result of getExcludeList().
See Also:
getExcludeList()

getKeywordsFilter

TestFilter getKeywordsFilter()
Get a filter which will filter tests according to the result of getKeywords(). If the result of getKeywords is null, the result of this method will also be null.

Returns:
a filter which will filter tests according to the result of getKeywords().
See Also:
getKeywords()

getPriorStatusFilter

TestFilter getPriorStatusFilter()
Get a filter which will filter tests according to the result of getPriorStatusValus(). If the result of getPriorStatusValues is null, the result of this method will also be null.

Returns:
a filter which will filter tests according to the result of getPriorStatusValues().
See Also:
getPriorStatusValues()

getRelevantTestFilter

TestFilter getRelevantTestFilter()
Get a test-suite specific filter which will filter tests according to test-suite-specific criteria, as perhaps determined by a configuration interview. For example, if the platform being tested does not support some optional feature, the tests for that feature could be automatically filtered out. If no such filter is required, null can be returned.

Returns:
a test-suite-specific filter, or null if no such filter is required.

getFilters

TestFilter[] getFilters()
Get an array of the non-null filters returned from getExcludeListFilter, getKeywordsFilter, getPriorStatusFilter, and getRelevantTestFilter.

Returns:
an array of the non-null filters returned by the various getXXXFilter methods.
See Also:
getExcludeListFilter(), getKeywordsFilter(), getPriorStatusFilter(), getRelevantTestFilter()

isValid

boolean isValid()
Determine whether all the configuration values are valid. If so, the result will be true; if not, the result will be false, and getErrorMessage will provide details about at least one of the invalid values.

Returns:
true if and only if all the configuration values are valid
See Also:
getErrorMessage()

getErrorMessage

java.lang.String getErrorMessage()
If there is an error in any of the configuration values, as indicated by isValid, this method will provide a detail message about one or more of the invalid values. The result is undefined if isValid is true.

Returns:
a detail message about one or more invalid values
See Also:
isValid()


Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.