Package 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
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
An interface providing basic abstract access to an integer specifying the maximum number of tests that can be run in parallel.static interface
An interface providing basic abstract access to the environment used to run each test.static interface
An interface providing basic abstract access to an exclude list, defining tests to be excluded from the test run.static interface
An interface providing basic abstract access to a keywords object which can be used to select tests according to their keywords.static interface
An interface providing abstract access to environments, as contained in a set of .jte files, as used by older, legacy test suites.static interface
An interface providing abstract access to an integer specifying the maximum number of tests that can be run in parallel.static interface
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
An interface providing abstract access to a keywords object which can be used to select tests according to their keywords.static interface
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
An interface providing abstract access to a set of paths defining the tests and folders of tests to be run.static interface
An interface providing abstract access to an integer specifying a scale factor for the standard timeout used for each test.static interface
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
An interface providing basic abstract access to the set of paths defining the tests and folders of tests to be run.static interface
An interface providing basic abstract access to an integer specifying a scale factor for the standard timeout used for each test. -
Method Summary
Modifier and TypeMethodDescriptionint
Get an integer specifying the maximum number of tests that may be run in parallel.Get an object which provides access to the integer specifying the maximum number of tests that may be run in parallel.getEnv()
Get the environment of test-suite-specific configuration values, to be passed to the script used to run each test.Get an object which provides access to the environment of test-suite-specific configuration values to be used when each test is run.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.Get an exclude list which identifies tests or test cases to be excluded from the test run.Get a filter which will filter tests according to the result of getExcludeList().Get an object which provides access to the exclude list which identifies tests or test cases to be excluded from the test run.Get an array of the non-null filters returned from getExcludeListFilter, getKeywordsFilter, getPriorStatusFilter, and getRelevantTestFilter.Get a keywords object which identifies tests to be run according to their keywords.Get a filter which will filter tests according to the result of getKeywords().Get an object which provides access to the keywords object which identifies tests to be run according to their keywords.Get a filter which will filter tests according to the result of getPriorStatusValus().Get an object which provides access to an array of booleans which identify tests to be run according to their prior execution status.boolean[]
Get an array of booleans which identify tests to be run according to their prior execution status.Get a test-suite specific filter which will filter tests according to test-suite-specific criteria, as perhaps determined by a configuration interview.String[]
getTests()
Get the paths identifying the tests or folders of tests within the test suite to be run.Get an object which provides access to the paths identifying the tests or folders of tests to be run.Get the test suite for which these parameters apply.float
Get an integer specifying a scale factor to be applied to the standard timeout for the test.Get an object which provides access to the integer specifying a scale factor to be applied to the standard timeout for the test.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
Set the test suite for which these parameters apply.void
Set the work directory for which these parameters apply.
-
Method Details
-
getTestSuite
TestSuite getTestSuite()Get the test suite for which these parameters apply.- Returns:
- the test suite for which these parameters apply.
- See Also:
-
setTestSuite
Set the test suite for which these parameters apply.- Parameters:
ts
- the test suite for which these parameters apply- See Also:
-
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
Set the work directory for which these parameters apply.- Parameters:
wd
- the work directory for which these parameters apply- See Also:
-
getTests
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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
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:
-