Package com.sun.javatest
Class BasicParameters
- java.lang.Object
-
- com.sun.javatest.BasicParameters
-
- All Implemented Interfaces:
Parameters,Parameters.ConcurrencyParameters,Parameters.ExcludeListParameters,Parameters.KeywordsParameters,Parameters.MutableConcurrencyParameters,Parameters.MutableExcludeListParameters,Parameters.MutableKeywordsParameters,Parameters.MutablePriorStatusParameters,Parameters.MutableTestsParameters,Parameters.MutableTimeoutFactorParameters,Parameters.PriorStatusParameters,Parameters.TestsParameters,Parameters.TimeoutFactorParameters
- Direct Known Subclasses:
FileParameters
public abstract class BasicParameters extends java.lang.Object implements Parameters, Parameters.MutableTestsParameters, Parameters.MutableExcludeListParameters, Parameters.MutableKeywordsParameters, Parameters.MutablePriorStatusParameters, Parameters.MutableConcurrencyParameters, Parameters.MutableTimeoutFactorParameters
A basic implementation of Parameters for all except the EnvParameters subsection.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.sun.javatest.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
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringconcurrencyErrorA string to identify any errors that may have occurred when setting the concurrency, or null if there were no such errors.protected java.lang.StringexcludeListErrorA string to identify any errors that may have occurred when setting the exclude list parameters, or null if there were no such errors.protected java.lang.StringkeywordsErrorA string to identify any errors that may have occurred when setting the keywords parameters, or null if there were no such errors.protected java.lang.StringtestSuiteErrorA string to identify any errors that may have occurred when setting the test suite, or null if there were no such errors.protected java.lang.StringtimeoutFactorErrorA string to identify any errors that may have occurred when setting the timeout factor, or null if there were no such errors.protected java.lang.StringworkDirErrorA string to identify any errors that may have occurred when setting the work directory, or null if there were no such errors.-
Fields inherited from interface com.sun.javatest.Parameters.ConcurrencyParameters
MAX_CONCURRENCY, MIN_CONCURRENCY
-
Fields inherited from interface com.sun.javatest.Parameters.MutableExcludeListParameters
CHECK_EVERY_RUN, CHECK_EVERY_X_DAYS, CUSTOM_EXCLUDE_LIST, INITIAL_EXCLUDE_LIST, LATEST_EXCLUDE_LIST, NO_EXCLUDE_LIST
-
Fields inherited from interface com.sun.javatest.Parameters.MutableKeywordsParameters
ALL_OF, ANY_OF, EXPR, MATCH_KEYWORDS, NO_KEYWORDS
-
Fields inherited from interface com.sun.javatest.Parameters.MutablePriorStatusParameters
MATCH_PRIOR_STATUS, NO_PRIOR_STATUS
-
Fields inherited from interface com.sun.javatest.Parameters.MutableTestsParameters
ALL_TESTS, SPECIFIED_TESTS
-
Fields inherited from interface com.sun.javatest.Parameters.TimeoutFactorParameters
MAX_TIMEOUT_FACTOR, MIN_TIMEOUT_FACTOR
-
-
Constructor Summary
Constructors Constructor Description BasicParameters()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static booleanequal(boolean[] b1, boolean... b2)Compare two boolean arrays for equality.protected static booleanequal(java.io.File[] f1, java.io.File... f2)Compare two arrays of Files for equality.protected static java.io.File[]getAbsoluteFiles(java.io.File baseDir, java.io.File... files)Convert a set of files to be absolute files.intgetConcurrency()Get an integer specifying the maximum number of tests that may be run in parallel.Parameters.ConcurrencyParametersgetConcurrencyParameters()Get an object which provides access to the integer specifying the maximum number of tests that may be run in parallel.java.io.File[]getCustomExcludeFiles()Get the files used to define the exclude list when the exclude list mode is set to CUSTOM_EXCLUDE_LIST.java.lang.StringgetErrorMessage()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.java.io.File[]getExcludeFiles()Get the set of files which define the exclude list.ExcludeListgetExcludeList()Get an exclude list which identifies tests or test cases to be excluded from the test run.TestFiltergetExcludeListFilter()Get a filter which will filter tests according to the result of getExcludeList().Parameters.ExcludeListParametersgetExcludeListParameters()Get an object which provides access to the exclude list which identifies tests or test cases to be excluded from the test run.intgetExcludeMode()Get the current exclude list mode.TestFilter[]getFilters()Get an array of the non-null filters returned from getExcludeListFilter, getKeywordsFilter, getPriorStatusFilter, and getRelevantTestFilter.KeywordsgetKeywords()Get a keywords object which identifies tests to be run according to their keywords.TestFiltergetKeywordsFilter()Get a filter which will filter tests according to the result of getKeywords().intgetKeywordsMode()Get the current keywords mode.Parameters.KeywordsParametersgetKeywordsParameters()Get an object which provides access to the keywords object which identifies tests to be run according to their keywords.intgetLatestExcludeAutoCheckInterval()Get the interval, in days, to be used when automatically checking for exclude list updates and the auto check mode is set to CHECK_EVERY_X_DAYS.intgetLatestExcludeAutoCheckMode()Get the mode which defines how often to automatically check for updated exclude lists, when the exclude list mode is set to LATEST_EXCLUDE_LIST, and the automatic check is enabled.intgetMatchKeywordsMode()Get a value which indicates how to interpret the match value, when the keywords mode is set to MATCH_KEYWORDS.java.lang.StringgetMatchKeywordsValue()Get a value that identifies which tests are to be selected, when the keywords mode is set to MATCH_KEYWORDS.boolean[]getMatchPriorStatusValues()Get an array of booleans which identify which tests to be run, according to their prior execution status.TestFiltergetPriorStatusFilter()Get a filter which will filter tests according to the result of getPriorStatusValus().intgetPriorStatusMode()Get the current mode determining whether tests are selected or not according to their prior execution status.Parameters.PriorStatusParametersgetPriorStatusParameters()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.TestFiltergetRelevantTestFilter()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[]getSpecifiedTests()Get the set of specified tests to be used as the set of tests to be run when the mode is set to SPECIFIED_TESTS.java.lang.String[]getTests()Get the paths identifying the tests or folders of tests within the test suite to be run.intgetTestsMode()Get the current mode for how the tests are specified.Parameters.TestsParametersgetTestsParameters()Get an object which provides access to the paths identifying the tests or folders of tests to be run.TestSuitegetTestSuite()Get the test suite for which these parameters apply.floatgetTimeoutFactor()Get an integer specifying a scale factor to be applied to the standard timeout for the test.Parameters.TimeoutFactorParametersgetTimeoutFactorParameters()Get an object which provides access to the integer specifying a scale factor to be applied to the standard timeout for the test.WorkDirectorygetWorkDirectory()Get the work directory in which to store the results of the test run.booleanisLatestExcludeAutoCheckEnabled()Check if the automatic check for newer exclude lists is enabled when the exclude list mode is set to LATEST_EXCLUDE_LIST.booleanisValid()Determine whether all the configuration values are valid.voidsetConcurrency(int conc)Set an integer specifying the maximum number of tests that may be run in parallel.voidsetCustomExcludeFiles(java.io.File... files)Set the files used to define the exclude list when the exclude list mode is set to CUSTOM_EXCLUDE_LIST.voidsetExcludeFiles(java.io.File... files)Set the set of files used to define the exclude list.voidsetExcludeMode(int mode)Set the current exclude list mode.voidsetKeywords(int mode, java.lang.String value)Set the details of the keywords to be used, if any, to filter tests for execution.voidsetKeywordsMode(int mode)Set the current keywords mode.voidsetLatestExcludeAutoCheckEnabled(boolean b)Specify if the automatic check for newer exclude lists is enabled when the exclude list mode is set to LATEST_EXCLUDE_LIST.voidsetLatestExcludeAutoCheckInterval(int days)Set the interval, in days, to be used when automatically checking for exclude list updates and the auto check mode is set to CHECK_EVERY_X_DAYS.voidsetLatestExcludeAutoCheckMode(int mode)Set the mode which defines how often to automatically check for updated exclude lists, when the exclude list mode is set to LATEST_EXCLUDE_LIST, and the automatic check is enabled.voidsetMatchKeywords(int mode, java.lang.String value)Set how to match a tests keywords when the keywords mode is set to MATCH_KEYWORDS.voidsetMatchPriorStatusValues(boolean... v)Set an array of booleans to identify which tests to be run, according to their prior execution status.voidsetPriorStatusMode(int mode)Set the current mode determining whether tests are selected or not according to their prior execution status.voidsetPriorStatusValues(boolean... values)Set which prior status values should be used, if any, to select tests for execution.voidsetSpecifiedTests(java.lang.String... tests)Set the specified tests to be be run when the mode is set to SPECIFIED_TESTS.voidsetTests(java.lang.String... tests)Specify the tests to be executed.voidsetTestsMode(int mode)Set the current mode for how the tests are specified.voidsetTestSuite(TestSuite ts)Set the test suite for the test run.voidsetTestSuite(java.io.File file)Set the test suite for the test run.voidsetTimeoutFactor(float tf)Set an integer specifying a scale factor to be applied to the standard timeout for the test.voidsetWorkDirectory(WorkDirectory wd)Set the work directory for the test run.voidsetWorkDirectory(java.io.File dir)Set the work directory for the test run.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sun.javatest.Parameters
getEnv, getEnvParameters
-
-
-
-
Field Detail
-
testSuiteError
protected java.lang.String testSuiteError
A string to identify any errors that may have occurred when setting the test suite, or null if there were no such errors.
-
workDirError
protected java.lang.String workDirError
A string to identify any errors that may have occurred when setting the work directory, or null if there were no such errors.
-
excludeListError
protected java.lang.String excludeListError
A string to identify any errors that may have occurred when setting the exclude list parameters, or null if there were no such errors.
-
keywordsError
protected java.lang.String keywordsError
A string to identify any errors that may have occurred when setting the keywords parameters, or null if there were no such errors.
-
concurrencyError
protected java.lang.String concurrencyError
A string to identify any errors that may have occurred when setting the concurrency, or null if there were no such errors.
-
timeoutFactorError
protected java.lang.String timeoutFactorError
A string to identify any errors that may have occurred when setting the timeout factor, or null if there were no such errors.
-
-
Method Detail
-
getAbsoluteFiles
protected static java.io.File[] getAbsoluteFiles(java.io.File baseDir, java.io.File... files)Convert a set of files to be absolute files. Files that are already absolute are left unchanged; relative files are evaluated relative to a specified base directory.- Parameters:
baseDir- The base directory for any relative filesfiles- The files to be made absolute, or null if none- Returns:
- the given files with any relative files having been evaluated relative to the given base directory, or null if files was null.
-
equal
protected static boolean equal(boolean[] b1, boolean... b2)Compare two boolean arrays for equality.- Parameters:
b1- the first array to be comparedb2- the second array to be compared- Returns:
- true and only if both arguments are null, or if both are not null and are element-wise equal.
-
equal
protected static boolean equal(java.io.File[] f1, java.io.File... f2)Compare two arrays of Files for equality.- Parameters:
f1- the first array to be comparedf2- the second array to be compared- Returns:
- true and only if both arguments are null, or if both are not null and are element-wise equal.
-
getTestSuite
public TestSuite getTestSuite()
Description copied from interface:ParametersGet the test suite for which these parameters apply.- Specified by:
getTestSuitein interfaceParameters- Returns:
- the test suite for which these parameters apply.
- See Also:
Parameters.setTestSuite(com.sun.javatest.TestSuite)
-
setTestSuite
public void setTestSuite(java.io.File file)
Set the test suite for the test run. The test suite may only be set once. If the test suite cannot be opened, isValid will return false, and getErrorMessage will contain an error message.- Parameters:
file- a path defining the test suite to be opened and set as the test suite for the test run.- See Also:
getTestSuite(),setTestSuite(TestSuite)
-
setTestSuite
public void setTestSuite(TestSuite ts)
Set the test suite for the test run. The test suite may only be set once.- Specified by:
setTestSuitein interfaceParameters- Parameters:
ts- the test suite to be set.- Throws:
java.lang.NullPointerException- if ts is nulljava.lang.IllegalStateException- if the test suite has already been set to something different- See Also:
getTestSuite()
-
getWorkDirectory
public WorkDirectory getWorkDirectory()
Description copied from interface:ParametersGet the work directory in which to store the results of the test run.- Specified by:
getWorkDirectoryin interfaceParameters- Returns:
- the work directory in which to store the results of the test run.
- See Also:
Parameters.setWorkDirectory(com.sun.javatest.WorkDirectory)
-
setWorkDirectory
public void setWorkDirectory(java.io.File dir)
Set the work directory for the test run. The work directory may only be set once. If the work directory cannot be opened, isValid will return false, and getErrorMessage will contain an error message. The test suite must already be set before this method is called.- Parameters:
dir- a path defining the work directory to be opened and set as the work directory for the test run.- See Also:
getWorkDirectory(),setWorkDirectory(WorkDirectory)
-
setWorkDirectory
public void setWorkDirectory(WorkDirectory wd)
Set the work directory for the test run. The work directory may only be set once. If the test suite has already been set, it must exactly match the test suite for the work directory; if the test suite has not yet been set, it will be set to the test suite for this work directory.- Specified by:
setWorkDirectoryin interfaceParameters- Parameters:
wd- the work directory to be set.- Throws:
java.lang.NullPointerException- if wd is nulljava.lang.IllegalStateException- if the work directory has already been set to something different- See Also:
getWorkDirectory()
-
getTestsParameters
public Parameters.TestsParameters getTestsParameters()
Description copied from interface:ParametersGet an object which provides access to the paths identifying the tests or folders of tests to be run.- Specified by:
getTestsParametersin interfaceParameters- Returns:
- an object which provides access to the paths identifying tests to be run.
-
getTests
public java.lang.String[] getTests()
Description copied from interface:ParametersGet the paths identifying the tests or folders of tests within the test suite to be run.- Specified by:
getTestsin interfaceParameters- Specified by:
getTestsin interfaceParameters.TestsParameters- Returns:
- an array of paths identifying the tests to be run
- See Also:
Parameters.TestsParameters.getTests()
-
setTests
public void setTests(java.lang.String... tests)
Description copied from interface:Parameters.MutableTestsParametersSpecify the tests to be executed.- Specified by:
setTestsin interfaceParameters.MutableTestsParameters- Parameters:
tests- If null, set the tests mode to ALL_TESTS; if not null, set the tests mode to SPECIFIED_TESTS, and set the specified tests.- See Also:
Parameters.TestsParameters.getTests()
-
getTestsMode
public int getTestsMode()
Description copied from interface:Parameters.MutableTestsParametersGet the current mode for how the tests are specified.- Specified by:
getTestsModein interfaceParameters.MutableTestsParameters- Returns:
- ALL_TESTS if all tests are to be run, irrespective of the selected tests, or SPECIFIED_TESTS if a set of specified tests are to be run.
- See Also:
Parameters.MutableTestsParameters.setTestsMode(int),Parameters.MutableTestsParameters.ALL_TESTS,Parameters.MutableTestsParameters.SPECIFIED_TESTS
-
setTestsMode
public void setTestsMode(int mode)
Description copied from interface:Parameters.MutableTestsParametersSet the current mode for how the tests are specified.- Specified by:
setTestsModein interfaceParameters.MutableTestsParameters- Parameters:
mode- use ALL_TESTS if all tests are to be run, irrespective of the selected tests, or SPECIFIED_TESTS if a set of specified tests are to be run.- See Also:
Parameters.MutableTestsParameters.getTestsMode(),Parameters.MutableTestsParameters.ALL_TESTS,Parameters.MutableTestsParameters.SPECIFIED_TESTS
-
getSpecifiedTests
public java.lang.String[] getSpecifiedTests()
Description copied from interface:Parameters.MutableTestsParametersGet the set of specified tests to be used as the set of tests to be run when the mode is set to SPECIFIED_TESTS. When the mode is set to ALL_TESTS, the specified tests are remembered, but not used, until the mode is set back to SPECIFIED_TESTS.- Specified by:
getSpecifiedTestsin interfaceParameters.MutableTestsParameters- Returns:
- an array of specified tests to be used as the set of tests to be run when the mode is set to SPECIFIED_TESTS.
- See Also:
Parameters.MutableTestsParameters.setSpecifiedTests(java.lang.String...),Parameters.TestsParameters.getTests()
-
setSpecifiedTests
public void setSpecifiedTests(java.lang.String... tests)
Description copied from interface:Parameters.MutableTestsParametersSet the specified tests to be be run when the mode is set to SPECIFIED_TESTS. When the mode is set to ALL_TESTS, these tests are remembered, but not used, until the mode is set back to SPECIFIED_TESTS.- Specified by:
setSpecifiedTestsin interfaceParameters.MutableTestsParameters- Parameters:
tests- an array of paths identifying the tests to be run- See Also:
Parameters.MutableTestsParameters.getSpecifiedTests(),Parameters.TestsParameters.getTests()
-
getExcludeListParameters
public Parameters.ExcludeListParameters getExcludeListParameters()
Description copied from interface:ParametersGet an object which provides access to the exclude list which identifies tests or test cases to be excluded from the test run.- Specified by:
getExcludeListParametersin interfaceParameters- Returns:
- an object which provides access to the exclude list identifying tests or test cases to be excluded from the test run.
-
getExcludeFiles
public java.io.File[] getExcludeFiles()
Description copied from interface:Parameters.MutableExcludeListParametersGet the set of files which define the exclude list. The files are all returned as absolute files.- Specified by:
getExcludeFilesin interfaceParameters.MutableExcludeListParameters- Returns:
- the set of files which define the exclude list
- See Also:
Parameters.MutableExcludeListParameters.getExcludeFiles(),Parameters.MutableExcludeListParameters.setExcludeFiles(java.io.File...)
-
setExcludeFiles
public void setExcludeFiles(java.io.File... files)
Description copied from interface:Parameters.MutableExcludeListParametersSet the set of files used to define the exclude list.- Specified by:
setExcludeFilesin interfaceParameters.MutableExcludeListParameters- Parameters:
files- If null, the exclude mode will be set to NO_EXCLUDE_LIST; if not null, the exclude mode will be set to CUSTOM_EXCLUDE_LIST and the custom exclude files will be set to this value- See Also:
Parameters.MutableExcludeListParameters.getExcludeFiles()
-
getExcludeList
public ExcludeList getExcludeList()
Description copied from interface:ParametersGet an exclude list which identifies tests or test cases to be excluded from the test run.- Specified by:
getExcludeListin interfaceParameters- Specified by:
getExcludeListin interfaceParameters.ExcludeListParameters- Returns:
- an exclude list identifying tests or test cases to be excluded from the test run.
- See Also:
Parameters.getExcludeListFilter(),Parameters.ExcludeListParameters.getExcludeList()
-
getExcludeListFilter
public TestFilter getExcludeListFilter()
Description copied from interface:ParametersGet 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.- Specified by:
getExcludeListFilterin interfaceParameters- Returns:
- a filter which will filter tests according to the result of getExcludeList().
- See Also:
Parameters.getExcludeList()
-
getExcludeMode
public int getExcludeMode()
Description copied from interface:Parameters.MutableExcludeListParametersGet the current exclude list mode.- Specified by:
getExcludeModein interfaceParameters.MutableExcludeListParameters- Returns:
- A value indicating the current exclude list mode
- See Also:
Parameters.MutableExcludeListParameters.setExcludeMode(int),Parameters.MutableExcludeListParameters.NO_EXCLUDE_LIST,Parameters.MutableExcludeListParameters.INITIAL_EXCLUDE_LIST,Parameters.MutableExcludeListParameters.LATEST_EXCLUDE_LIST,Parameters.MutableExcludeListParameters.CUSTOM_EXCLUDE_LIST
-
setExcludeMode
public void setExcludeMode(int mode)
Description copied from interface:Parameters.MutableExcludeListParametersSet the current exclude list mode.- Specified by:
setExcludeModein interfaceParameters.MutableExcludeListParameters- Parameters:
mode- A value indicating the desired exclude list mode- See Also:
Parameters.MutableExcludeListParameters.getExcludeMode(),Parameters.MutableExcludeListParameters.NO_EXCLUDE_LIST,Parameters.MutableExcludeListParameters.INITIAL_EXCLUDE_LIST,Parameters.MutableExcludeListParameters.LATEST_EXCLUDE_LIST,Parameters.MutableExcludeListParameters.CUSTOM_EXCLUDE_LIST
-
getCustomExcludeFiles
public java.io.File[] getCustomExcludeFiles()
Description copied from interface:Parameters.MutableExcludeListParametersGet the files used to define the exclude list when the exclude list mode is set to CUSTOM_EXCLUDE_LIST.- Specified by:
getCustomExcludeFilesin interfaceParameters.MutableExcludeListParameters- Returns:
- the files used to define a custom exclude list
- See Also:
Parameters.MutableExcludeListParameters.setCustomExcludeFiles(java.io.File...)
-
setCustomExcludeFiles
public void setCustomExcludeFiles(java.io.File... files)
Description copied from interface:Parameters.MutableExcludeListParametersSet the files used to define the exclude list when the exclude list mode is set to CUSTOM_EXCLUDE_LIST.- Specified by:
setCustomExcludeFilesin interfaceParameters.MutableExcludeListParameters- Parameters:
files- the files used to define a custom exclude list- See Also:
Parameters.MutableExcludeListParameters.getCustomExcludeFiles()
-
isLatestExcludeAutoCheckEnabled
public boolean isLatestExcludeAutoCheckEnabled()
Description copied from interface:Parameters.MutableExcludeListParametersCheck if the automatic check for newer exclude lists is enabled when the exclude list mode is set to LATEST_EXCLUDE_LIST.- Specified by:
isLatestExcludeAutoCheckEnabledin interfaceParameters.MutableExcludeListParameters- Returns:
- true if the automatic check is enabled
- See Also:
Parameters.MutableExcludeListParameters.setLatestExcludeAutoCheckEnabled(boolean)
-
setLatestExcludeAutoCheckEnabled
public void setLatestExcludeAutoCheckEnabled(boolean b)
Description copied from interface:Parameters.MutableExcludeListParametersSpecify if the automatic check for newer exclude lists is enabled when the exclude list mode is set to LATEST_EXCLUDE_LIST.- Specified by:
setLatestExcludeAutoCheckEnabledin interfaceParameters.MutableExcludeListParameters- Parameters:
b- whether or not the automatic check is enabled- See Also:
Parameters.MutableExcludeListParameters.isLatestExcludeAutoCheckEnabled()
-
getLatestExcludeAutoCheckMode
public int getLatestExcludeAutoCheckMode()
Description copied from interface:Parameters.MutableExcludeListParametersGet the mode which defines how often to automatically check for updated exclude lists, when the exclude list mode is set to LATEST_EXCLUDE_LIST, and the automatic check is enabled.- Specified by:
getLatestExcludeAutoCheckModein interfaceParameters.MutableExcludeListParameters- Returns:
- a value indicating how often to check for the availability of a newer exclude list
- See Also:
Parameters.MutableExcludeListParameters.setLatestExcludeAutoCheckMode(int),Parameters.MutableExcludeListParameters.CHECK_EVERY_X_DAYS,Parameters.MutableExcludeListParameters.CHECK_EVERY_RUN
-
setLatestExcludeAutoCheckMode
public void setLatestExcludeAutoCheckMode(int mode)
Description copied from interface:Parameters.MutableExcludeListParametersSet the mode which defines how often to automatically check for updated exclude lists, when the exclude list mode is set to LATEST_EXCLUDE_LIST, and the automatic check is enabled.- Specified by:
setLatestExcludeAutoCheckModein interfaceParameters.MutableExcludeListParameters- Parameters:
mode- a value indicating how often to check for the availability of a newer exclude list- See Also:
Parameters.MutableExcludeListParameters.getLatestExcludeAutoCheckMode(),Parameters.MutableExcludeListParameters.CHECK_EVERY_X_DAYS,Parameters.MutableExcludeListParameters.CHECK_EVERY_RUN
-
getLatestExcludeAutoCheckInterval
public int getLatestExcludeAutoCheckInterval()
Description copied from interface:Parameters.MutableExcludeListParametersGet the interval, in days, to be used when automatically checking for exclude list updates and the auto check mode is set to CHECK_EVERY_X_DAYS.- Specified by:
getLatestExcludeAutoCheckIntervalin interfaceParameters.MutableExcludeListParameters- Returns:
- the interval, in days, between checks
- See Also:
Parameters.MutableExcludeListParameters.setLatestExcludeAutoCheckInterval(int)
-
setLatestExcludeAutoCheckInterval
public void setLatestExcludeAutoCheckInterval(int days)
Description copied from interface:Parameters.MutableExcludeListParametersSet the interval, in days, to be used when automatically checking for exclude list updates and the auto check mode is set to CHECK_EVERY_X_DAYS.- Specified by:
setLatestExcludeAutoCheckIntervalin interfaceParameters.MutableExcludeListParameters- Parameters:
days- the number of days to wait between checks- See Also:
Parameters.MutableExcludeListParameters.getLatestExcludeAutoCheckInterval()
-
getKeywordsParameters
public Parameters.KeywordsParameters getKeywordsParameters()
Description copied from interface:ParametersGet an object which provides access to the keywords object which identifies tests to be run according to their keywords.- Specified by:
getKeywordsParametersin interfaceParameters- Returns:
- an object which provides access to the keywords object which identifies tests to be run according to their keywords.
-
getKeywords
public Keywords getKeywords()
Description copied from interface:ParametersGet a keywords object which identifies tests to be run according to their keywords.- Specified by:
getKeywordsin interfaceParameters- Specified by:
getKeywordsin interfaceParameters.KeywordsParameters- Returns:
- a keywords object which identifies tests to be run according to their keywords.
- See Also:
Parameters.KeywordsParameters.getKeywords()
-
setKeywords
public void setKeywords(int mode, java.lang.String value)Description copied from interface:Parameters.MutableKeywordsParametersSet the details of the keywords to be used, if any, to filter tests for execution.- Specified by:
setKeywordsin interfaceParameters.MutableKeywordsParameters- Parameters:
mode- the value of the match keywords mode to be set ifvalueis not nullvalue- if null, the keywords mode will be set to NO_KEYWORDS; if not null, the keywords mode will be set to MATCH_KEYWORDS, the match keywords mode will be set tomode, and the match keywords value will be set to this value- See Also:
Parameters.KeywordsParameters.getKeywords(),Parameters.MutableKeywordsParameters.NO_KEYWORDS,Parameters.MutableKeywordsParameters.MATCH_KEYWORDS
-
getKeywordsFilter
public TestFilter getKeywordsFilter()
Description copied from interface:ParametersGet 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.- Specified by:
getKeywordsFilterin interfaceParameters- Returns:
- a filter which will filter tests according to the result of getKeywords().
- See Also:
Parameters.getKeywords()
-
getKeywordsMode
public int getKeywordsMode()
Description copied from interface:Parameters.MutableKeywordsParametersGet the current keywords mode.- Specified by:
getKeywordsModein interfaceParameters.MutableKeywordsParameters- Returns:
- NO_KEYWORDS if no keyword filtering will be used to select tests for execution, or MATCH_KEYWORDS if keywords will be filtered according to the match mode and match value.
- See Also:
Parameters.MutableKeywordsParameters.setKeywordsMode(int),Parameters.MutableKeywordsParameters.NO_KEYWORDS,Parameters.MutableKeywordsParameters.MATCH_KEYWORDS
-
setKeywordsMode
public void setKeywordsMode(int mode)
Description copied from interface:Parameters.MutableKeywordsParametersSet the current keywords mode.- Specified by:
setKeywordsModein interfaceParameters.MutableKeywordsParameters- Parameters:
mode- set to NO_KEYWORDS if no keyword filtering will be used to select tests for execution, or MATCH_KEYWORDS if keywords will be filtered according to the match mode and match value.- See Also:
Parameters.MutableKeywordsParameters.getKeywordsMode(),Parameters.MutableKeywordsParameters.NO_KEYWORDS,Parameters.MutableKeywordsParameters.MATCH_KEYWORDS
-
getMatchKeywordsMode
public int getMatchKeywordsMode()
Description copied from interface:Parameters.MutableKeywordsParametersGet a value which indicates how to interpret the match value, when the keywords mode is set to MATCH_KEYWORDS.- Specified by:
getMatchKeywordsModein interfaceParameters.MutableKeywordsParameters- Returns:
- a value which indicates how to interpret the match value, when the keywords mode is set to MATCH_KEYWORDS
- See Also:
Parameters.MutableKeywordsParameters.setMatchKeywords(int, java.lang.String),Parameters.MutableKeywordsParameters.ANY_OF,Parameters.MutableKeywordsParameters.ALL_OF,Parameters.MutableKeywordsParameters.EXPR
-
getMatchKeywordsValue
public java.lang.String getMatchKeywordsValue()
Description copied from interface:Parameters.MutableKeywordsParametersGet a value that identifies which tests are to be selected, when the keywords mode is set to MATCH_KEYWORDS.- Specified by:
getMatchKeywordsValuein interfaceParameters.MutableKeywordsParameters- Returns:
- a value that identifies which tests are to be selected, when the keywords mode is set to MATCH_KEYWORDS
- See Also:
Parameters.MutableKeywordsParameters.setMatchKeywords(int, java.lang.String),Parameters.MutableKeywordsParameters.ANY_OF,Parameters.MutableKeywordsParameters.ALL_OF,Parameters.MutableKeywordsParameters.EXPR
-
setMatchKeywords
public void setMatchKeywords(int mode, java.lang.String value)Description copied from interface:Parameters.MutableKeywordsParametersSet how to match a tests keywords when the keywords mode is set to MATCH_KEYWORDS.- Specified by:
setMatchKeywordsin interfaceParameters.MutableKeywordsParameters- Parameters:
mode- A value indicating how to interpretvaluevalue- Ifmodeis set to ANY_OF or ALL_OF, this value should give a white-space separate list of keywords to be matched; ifmodeis set to EXPR, this value should be a boolean expression using terminals, & (and), | (or), ! (negation) and parentheses, where the terminals are true if a test description contains that name as one of its keywords.- See Also:
Parameters.MutableKeywordsParameters.getMatchKeywordsMode(),Parameters.MutableKeywordsParameters.getMatchKeywordsValue(),Parameters.MutableKeywordsParameters.ANY_OF,Parameters.MutableKeywordsParameters.ALL_OF,Parameters.MutableKeywordsParameters.EXPR
-
getPriorStatusParameters
public Parameters.PriorStatusParameters getPriorStatusParameters()
Description copied from interface:ParametersGet an object which provides access to an array of booleans which identify tests to be run according to their prior execution status.- Specified by:
getPriorStatusParametersin interfaceParameters- 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.
-
getPriorStatusValues
public boolean[] getPriorStatusValues()
Description copied from interface:ParametersGet 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.- Specified by:
getPriorStatusValuesin interfaceParameters- Specified by:
getPriorStatusValuesin interfaceParameters.PriorStatusParameters- 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()
-
setPriorStatusValues
public void setPriorStatusValues(boolean... values)
Description copied from interface:Parameters.MutablePriorStatusParametersSet which prior status values should be used, if any, to select tests for execution.- Specified by:
setPriorStatusValuesin interfaceParameters.MutablePriorStatusParameters- Parameters:
values- if null, the prior status mode will be set to NO_PRIOR_STATUS; if not null, the prior status mode will be set to MATCH_PRIOR_STATUS, and the matching values will be set to this array.- See Also:
Parameters.PriorStatusParameters.getPriorStatusValues()
-
getPriorStatusFilter
public TestFilter getPriorStatusFilter()
Description copied from interface:ParametersGet 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.- Specified by:
getPriorStatusFilterin interfaceParameters- Returns:
- a filter which will filter tests according to the result of getPriorStatusValues().
- See Also:
Parameters.getPriorStatusValues()
-
getPriorStatusMode
public int getPriorStatusMode()
Description copied from interface:Parameters.MutablePriorStatusParametersGet the current mode determining whether tests are selected or not according to their prior execution status.- Specified by:
getPriorStatusModein interfaceParameters.MutablePriorStatusParameters- Returns:
- a value of NO_PRIOR_STATUS indicates the prior execution status will not be taken into account; otherwise, a value of MATCH_PRIOR_STATUS means that tests will be selected if and only of their execution status matches one of the matching prior status values.
- See Also:
Parameters.MutablePriorStatusParameters.setPriorStatusMode(int),Parameters.MutablePriorStatusParameters.NO_PRIOR_STATUS,Parameters.MutablePriorStatusParameters.MATCH_PRIOR_STATUS
-
setPriorStatusMode
public void setPriorStatusMode(int mode)
Description copied from interface:Parameters.MutablePriorStatusParametersSet the current mode determining whether tests are selected or not according to their prior execution status.- Specified by:
setPriorStatusModein interfaceParameters.MutablePriorStatusParameters- Parameters:
mode- if set to NO_PRIOR_STATUS, the prior execution status will not be taken into account; otherwise, if set to MATCH_PRIOR_STATUS tests will be selected if and only of their execution status matches one of the matching prior status values.- See Also:
Parameters.MutablePriorStatusParameters.getPriorStatusMode(),Parameters.MutablePriorStatusParameters.NO_PRIOR_STATUS,Parameters.MutablePriorStatusParameters.MATCH_PRIOR_STATUS
-
getMatchPriorStatusValues
public boolean[] getMatchPriorStatusValues()
Description copied from interface:Parameters.MutablePriorStatusParametersGet an array of booleans which identify which tests to be run, according to their prior execution status. The array can be indexed by the constantsStatus.PASSED,Status.FAILED,Status.ERROR, andStatus.NOT_RUN. A test will be selected for execution if the entry in the array corresponding to the tests execution status is set to true.- Specified by:
getMatchPriorStatusValuesin interfaceParameters.MutablePriorStatusParameters- Returns:
- an array of booleans which identifying the prior execution status of tests to be selected to be executed.
- See Also:
Parameters.MutablePriorStatusParameters.setMatchPriorStatusValues(boolean...)
-
setMatchPriorStatusValues
public void setMatchPriorStatusValues(boolean... v)
Description copied from interface:Parameters.MutablePriorStatusParametersSet an array of booleans to identify which tests to be run, according to their prior execution status. The array can be indexed by the constantsStatus.PASSED,Status.FAILED,Status.ERROR, andStatus.NOT_RUN. A test will be selected for execution if the entry in the array corresponding to the tests execution status is set to true.- Specified by:
setMatchPriorStatusValuesin interfaceParameters.MutablePriorStatusParameters- Parameters:
v- an array of booleans which identifying the prior execution status of tests to be selected to be executed.- See Also:
Parameters.MutablePriorStatusParameters.getMatchPriorStatusValues()
-
getConcurrencyParameters
public Parameters.ConcurrencyParameters getConcurrencyParameters()
Description copied from interface:ParametersGet an object which provides access to the integer specifying the maximum number of tests that may be run in parallel.- Specified by:
getConcurrencyParametersin interfaceParameters- Returns:
- an object which provides access to the integer specifying the maximum number of tests that may be run in parallel.
-
getConcurrency
public int getConcurrency()
Description copied from interface:ParametersGet an integer specifying the maximum number of tests that may be run in parallel.- Specified by:
getConcurrencyin interfaceParameters- Specified by:
getConcurrencyin interfaceParameters.ConcurrencyParameters- Returns:
- an integer specifying the maximum number of tests that may be run in parallel
- See Also:
Parameters.ConcurrencyParameters.getConcurrency()
-
setConcurrency
public void setConcurrency(int conc)
Description copied from interface:Parameters.MutableConcurrencyParametersSet an integer specifying the maximum number of tests that may be run in parallel.- Specified by:
setConcurrencyin interfaceParameters.MutableConcurrencyParameters- Parameters:
conc- an integer specifying the maximum number of tests that may be run in parallel- See Also:
Parameters.ConcurrencyParameters.getConcurrency()
-
getTimeoutFactorParameters
public Parameters.TimeoutFactorParameters getTimeoutFactorParameters()
Description copied from interface:ParametersGet an object which provides access to the integer specifying a scale factor to be applied to the standard timeout for the test.- Specified by:
getTimeoutFactorParametersin interfaceParameters- Returns:
- an object which provides access to the integer specifying a scale factor to be applied to the standard timeout for each test.
-
getTimeoutFactor
public float getTimeoutFactor()
Description copied from interface:ParametersGet an integer specifying a scale factor to be applied to the standard timeout for the test.- Specified by:
getTimeoutFactorin interfaceParameters- Specified by:
getTimeoutFactorin interfaceParameters.TimeoutFactorParameters- Returns:
- an integer specifying a scale factor to be applied to the standard timeout for each test.
- See Also:
Parameters.TimeoutFactorParameters.getTimeoutFactor()
-
setTimeoutFactor
public void setTimeoutFactor(float tf)
Description copied from interface:Parameters.MutableTimeoutFactorParametersSet an integer specifying a scale factor to be applied to the standard timeout for the test.- Specified by:
setTimeoutFactorin interfaceParameters.MutableTimeoutFactorParameters- Parameters:
tf- an integer specifying a scale factor to be applied to the standard timeout for each test.- See Also:
Parameters.TimeoutFactorParameters.getTimeoutFactor()
-
getRelevantTestFilter
public TestFilter getRelevantTestFilter()
Description copied from interface:ParametersGet 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.- Specified by:
getRelevantTestFilterin interfaceParameters- Returns:
- a test-suite-specific filter, or null if no such filter is required.
-
getFilters
public TestFilter[] getFilters()
Description copied from interface:ParametersGet an array of the non-null filters returned from getExcludeListFilter, getKeywordsFilter, getPriorStatusFilter, and getRelevantTestFilter.- Specified by:
getFiltersin interfaceParameters- Returns:
- an array of the non-null filters returned by the various getXXXFilter methods.
- See Also:
Parameters.getExcludeListFilter(),Parameters.getKeywordsFilter(),Parameters.getPriorStatusFilter(),Parameters.getRelevantTestFilter()
-
isValid
public boolean isValid()
Description copied from interface:ParametersDetermine 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.- Specified by:
isValidin interfaceParameters- Returns:
- true if and only if all the configuration values are valid
- See Also:
Parameters.getErrorMessage()
-
getErrorMessage
public java.lang.String getErrorMessage()
Description copied from interface:ParametersIf 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.- Specified by:
getErrorMessagein interfaceParameters- Returns:
- a detail message about one or more invalid values
- See Also:
Parameters.isValid()
-
-