public class FileParameters extends BasicParameters implements Parameters.LegacyEnvParameters
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.TimeoutFactorParametersconcurrencyError, excludeListError, keywordsError, testSuiteError, timeoutFactorError, workDirErrorALL_TESTS, SPECIFIED_TESTSCHECK_EVERY_RUN, CHECK_EVERY_X_DAYS, CUSTOM_EXCLUDE_LIST, INITIAL_EXCLUDE_LIST, LATEST_EXCLUDE_LIST, NO_EXCLUDE_LISTALL_OF, ANY_OF, EXPR, MATCH_KEYWORDS, NO_KEYWORDSMATCH_PRIOR_STATUS, NO_PRIOR_STATUSMAX_CONCURRENCY, MIN_CONCURRENCYMAX_TIMEOUT_FACTOR, MIN_TIMEOUT_FACTOR| Constructor and Description |
|---|
FileParameters()
Create an empty FileParameters object.
|
FileParameters(java.io.File file)
Create a FileParameters object, based on data read from a parameter file.
|
FileParameters(java.lang.String[] args)
Create a FileParameters object, based on command-line-like args.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.File[] |
getAbsoluteEnvFiles()
Get the set of files which define the environment used to run
the tests.
|
TestEnvironment |
getEnv()
Get the environment of test-suite-specific configuration values,
to be passed to the script used to run each test.
|
java.io.File[] |
getEnvFiles()
Get the set of files which define the environment used to run
the tests.
|
java.lang.String |
getEnvName()
Get the name of the environment to be used, from the set of
environments contained in the fles set by setEnvFiles.
|
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.
|
TestEnvContext |
getEnvTable()
Get an object containing the environments read from the environment files.
|
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.
|
java.io.File |
getReportDir()
Get the report directory given in the parameters.
|
static boolean |
isParameterFile(java.io.File file)
Determine if the specified file is a parameter file,
as determined by whether its extension is .jtp or not.
|
boolean |
isValid()
Determine whether all the configuration values are valid.
|
void |
setEnvFiles(java.io.File[] files)
Set the files which contain the environment used to run
the tests.
|
void |
setEnvName(java.lang.String name)
Set the name of the environment to be used, from the set of
environments contained in the fles set by setEnvFiles.
|
void |
setReportDir(java.io.File dir)
Set the report directory.
|
equal, equal, getAbsoluteFiles, getConcurrency, getConcurrencyParameters, getCustomExcludeFiles, getExcludeFiles, getExcludeList, getExcludeListFilter, getExcludeListParameters, getExcludeMode, getFilters, getKeywords, getKeywordsFilter, getKeywordsMode, getKeywordsParameters, getLatestExcludeAutoCheckInterval, getLatestExcludeAutoCheckMode, getMatchKeywordsMode, getMatchKeywordsValue, getMatchPriorStatusValues, getPriorStatusFilter, getPriorStatusMode, getPriorStatusParameters, getPriorStatusValues, getRelevantTestFilter, getSpecifiedTests, getTests, getTestsMode, getTestsParameters, getTestSuite, getTimeoutFactor, getTimeoutFactorParameters, getWorkDirectory, isLatestExcludeAutoCheckEnabled, setConcurrency, setCustomExcludeFiles, setExcludeFiles, setExcludeMode, setKeywords, setKeywordsMode, setLatestExcludeAutoCheckEnabled, setLatestExcludeAutoCheckInterval, setLatestExcludeAutoCheckMode, setMatchKeywords, setMatchPriorStatusValues, setPriorStatusMode, setPriorStatusValues, setSpecifiedTests, setTests, setTestsMode, setTestSuite, setTestSuite, setTimeoutFactor, setWorkDirectory, setWorkDirectorypublic FileParameters()
public FileParameters(java.io.File file)
throws java.io.FileNotFoundException,
java.io.IOException
file - the file to be read to initialize this objectjava.io.FileNotFoundException - if the file does not existjava.io.IOException - if there is a problem reading the filepublic FileParameters(java.lang.String[] args)
-t testsuite-testsuite testsuite
-keywords expr
-status status-list
passed,
failed,
error,
notRun
-exclude exclude-list-file
-envFile environment-file
-env environment-name
-concurrency number
-timeoutFactor number
-report report-dir-r report-dir
-workDir work-dir-w work-dir
args - The args used to initialize the FileParameters object.java.lang.IllegalArgumentException - If an unrecognized argument is found.public static boolean isParameterFile(java.io.File file)
file - the file to be checkedpublic Parameters.EnvParameters getEnvParameters()
ParametersgetEnvParameters in interface Parameterspublic java.io.File[] getEnvFiles()
Parameters.LegacyEnvParametersgetEnvFiles in interface Parameters.LegacyEnvParametersParameters.LegacyEnvParameters.getAbsoluteEnvFiles(),
Parameters.LegacyEnvParameters.setEnvFiles(java.io.File[])public java.io.File[] getAbsoluteEnvFiles()
Parameters.LegacyEnvParametersgetAbsoluteEnvFiles in interface Parameters.LegacyEnvParametersParameters.LegacyEnvParameters.getEnvFiles(),
Parameters.LegacyEnvParameters.setEnvFiles(java.io.File[])public void setEnvFiles(java.io.File[] files)
Parameters.LegacyEnvParameterssetEnvFiles in interface Parameters.LegacyEnvParametersfiles - the set of files which contain the environment
to be usedParameters.LegacyEnvParameters.getEnvFiles(),
Parameters.LegacyEnvParameters.getAbsoluteEnvFiles()public java.lang.String getEnvName()
Parameters.LegacyEnvParametersgetEnvName in interface Parameters.LegacyEnvParametersParameters.LegacyEnvParameters.setEnvName(java.lang.String)public void setEnvName(java.lang.String name)
Parameters.LegacyEnvParameterssetEnvName in interface Parameters.LegacyEnvParametersname - the name of the environment to be used to run the testsParameters.LegacyEnvParameters.getEnvName()public TestEnvContext getEnvTable()
setEnvFiles(java.io.File[]),
setEnvName(java.lang.String)public TestEnvironment getEnv()
Parameters.EnvParametersgetEnv in interface ParametersgetEnv in interface Parameters.EnvParametersParameters.getEnv()public boolean isValid()
ParametersisValid in interface ParametersisValid in class BasicParametersParameters.getErrorMessage()public java.lang.String getErrorMessage()
ParametersgetErrorMessage in interface ParametersgetErrorMessage in class BasicParametersParameters.isValid()public java.io.File getReportDir()
setReportDir(java.io.File)public void setReportDir(java.io.File dir)
dir - the report directorygetReportDir()Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.