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.TimeoutFactorParameters
concurrencyError, excludeListError, keywordsError, testSuiteError, timeoutFactorError, workDirError
ALL_TESTS, SPECIFIED_TESTS
CHECK_EVERY_RUN, CHECK_EVERY_X_DAYS, CUSTOM_EXCLUDE_LIST, INITIAL_EXCLUDE_LIST, LATEST_EXCLUDE_LIST, NO_EXCLUDE_LIST
ALL_OF, ANY_OF, EXPR, MATCH_KEYWORDS, NO_KEYWORDS
MATCH_PRIOR_STATUS, NO_PRIOR_STATUS
MAX_CONCURRENCY, MIN_CONCURRENCY
MAX_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, setWorkDirectory
public 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()
Parameters
getEnvParameters
in interface Parameters
public java.io.File[] getEnvFiles()
Parameters.LegacyEnvParameters
getEnvFiles
in interface Parameters.LegacyEnvParameters
Parameters.LegacyEnvParameters.getAbsoluteEnvFiles()
,
Parameters.LegacyEnvParameters.setEnvFiles(java.io.File[])
public java.io.File[] getAbsoluteEnvFiles()
Parameters.LegacyEnvParameters
getAbsoluteEnvFiles
in interface Parameters.LegacyEnvParameters
Parameters.LegacyEnvParameters.getEnvFiles()
,
Parameters.LegacyEnvParameters.setEnvFiles(java.io.File[])
public void setEnvFiles(java.io.File[] files)
Parameters.LegacyEnvParameters
setEnvFiles
in interface Parameters.LegacyEnvParameters
files
- the set of files which contain the environment
to be usedParameters.LegacyEnvParameters.getEnvFiles()
,
Parameters.LegacyEnvParameters.getAbsoluteEnvFiles()
public java.lang.String getEnvName()
Parameters.LegacyEnvParameters
getEnvName
in interface Parameters.LegacyEnvParameters
Parameters.LegacyEnvParameters.setEnvName(java.lang.String)
public void setEnvName(java.lang.String name)
Parameters.LegacyEnvParameters
setEnvName
in interface Parameters.LegacyEnvParameters
name
- 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.EnvParameters
getEnv
in interface Parameters
getEnv
in interface Parameters.EnvParameters
Parameters.getEnv()
public boolean isValid()
Parameters
isValid
in interface Parameters
isValid
in class BasicParameters
Parameters.getErrorMessage()
public java.lang.String getErrorMessage()
Parameters
getErrorMessage
in interface Parameters
getErrorMessage
in class BasicParameters
Parameters.isValid()
public java.io.File getReportDir()
setReportDir(java.io.File)
public void setReportDir(java.io.File dir)
dir
- the report directorygetReportDir()
Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.