Class JUnitOptions
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<String>
,Collection<String>
,List<String>
,RandomAccess
- Since:
- 1.5.20
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
boolean
addAll
(int index, Collection<? extends String> c) boolean
addAll
(Collection<? extends String> c) colorPalette
(File file) Specify a path to a properties file to customize ANSI style of output (not supported by all terminals).Set a configuration parameter for test discovery and execution.Configures the default options that bld uses when no options have been explicitly set.details
(JUnitOptions.Details details) Select an output details mode for when tests are executed.detailsTheme
(JUnitOptions.Theme theme) Select an output details tree theme for when tests are executed.Disable ANSI colors in output (not supported by all terminals).Disable print out of the welcome message.excludeClassname
(String regexPattern) Provide a regular expression to exclude those classes whose fully qualified names match.excludeEngine
(String id) Provide the ID of an engine to be excluded in the test run.excludePackage
(String name) Provide a package to be excluded from the test run.excludeTag
(String tag) Provide a tag or tag expression to exclude those tests whose tags match.Fail and return exit status code 2 if no tests are found.includeClassname
(String regexPattern) Provide a regular expression to include only classes whose fully qualified names match.includeEngine
(String id) Provide the ID of an engine to be included in the test run.includePackage
(String name) Provide a package to be included in the test run.includeTag
(String tag) Provide a tag or tag expression to include only tests whose tags match.reportsDir
(File dir) Enable report output into a specified local directory (will be created if it does not exist).Scan all directories on the classpath.scanClassPath
(String path) Scan an explicit classpath root.EXPERIMENTAL: Scan all resolved modules for test discoveryselectClass
(String name) Select a class for test discovery.selectDirectory
(File file) Select a directory for test discovery.selectFile
(File file) Select a file for test discovery.selectIteration
(String iteration) Select iterations for test discovery of formatTYPE:VALUE[INDEX(..INDEX)?(,INDEX(..INDEX)?)*]
(e.g.selectMethod
(String name) Select a method for test discovery.selectModule
(String name) EXPERIMENTAL: Select single module for test discovery.selectPackage
(String name) Select a package for test discovery.selectResource
(String resource) Select a classpath resource for test discovery.Select a URI for test discovery.Style test output using only text attributes, no color (not supported by all terminals).Methods inherited from class java.util.ArrayList
clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods inherited from interface java.util.List
containsAll
-
Constructor Details
-
JUnitOptions
public JUnitOptions()
-
-
Method Details
-
addAll
-
addAll
-
set
-
add
-
add
-
defaultOptions
Configures the default options that bld uses when no options have been explicitly set.- Returns:
- this list of options
- Since:
- 1.5.20
-
scanClassPath
Scan all directories on the classpath.Only directories on the system classpath as well as additional classpath entries supplied via -cp (directories and JAR files) are scanned.
Removes all the
select
options since they are mutually exclusive.- Returns:
- this list of options
- Since:
- 1.5.20
-
scanClassPath
Scan an explicit classpath root.Explicit classpath roots that are not on the classpath will be silently ignored.
Removes all the
select
options since they are mutually exclusive.This option can be repeated.
- Returns:
- this list of options
- Since:
- 1.5.20
-
scanModules
EXPERIMENTAL: Scan all resolved modules for test discoveryRemoves all the
scanClasspath
options since they are mutually exclusive.Removes all the
scanClasspath
options since they are mutually exclusive.- Returns:
- this list of options
- Since:
- 1.5.20
-
selectUri
Select a URI for test discovery.Removes all the
scanClasspath
options since they are mutually exclusive.This option can be repeated.
- Returns:
- this list of options
- Since:
- 1.5.20
-
selectFile
Select a file for test discovery.Removes all the
scanClasspath
options since they are mutually exclusive.This option can be repeated.
- Returns:
- this list of options
- Since:
- 1.5.20
-
selectDirectory
Select a directory for test discovery.Removes all the
scanClasspath
options since they are mutually exclusive.This option can be repeated.
- Returns:
- this list of options
- Since:
- 1.5.20
-
selectModule
EXPERIMENTAL: Select single module for test discovery.Removes all the
scanClasspath
options since they are mutually exclusive.This option can be repeated.
- Returns:
- this list of options
- Since:
- 1.5.20
-
selectPackage
Select a package for test discovery.Removes all the
scanClasspath
options since they are mutually exclusive.This option can be repeated.
- Returns:
- this list of options
- Since:
- 1.5.20
-
selectClass
Select a class for test discovery.Removes all the
scanClasspath
options since they are mutually exclusive.This option can be repeated.
- Returns:
- this list of options
- Since:
- 1.5.20
-
selectMethod
Select a method for test discovery.Removes all the
scanClasspath
options since they are mutually exclusive.This option can be repeated.
- Returns:
- this list of options
- Since:
- 1.5.20
-
selectResource
Select a classpath resource for test discovery.Removes all the
scanClasspath
options since they are mutually exclusive.This option can be repeated.
- Returns:
- this list of options
- Since:
- 1.5.20
-
selectIteration
Select iterations for test discovery of formatTYPE:VALUE[INDEX(..INDEX)?(,INDEX(..INDEX)?)*]
(e.g. method:com.acme.Foo#m()[1..2]).Removes all the
scanClasspath
options since they are mutually exclusive.This option can be repeated.
- Returns:
- this list of options
- Since:
- 1.5.20
-
includeClassname
Provide a regular expression to include only classes whose fully qualified names match. To avoid loading classes unnecessarily, the default pattern only includes class names that begin with "Test" or end with "Test" or "Tests". When this option is repeated, all patterns will be combined using OR semantics. Default: ^(Test.*|.+[.$]Test.*|.*Tests?)$This option can be repeated.
- Returns:
- this list of options
- Since:
- 1.5.20
-
excludeClassname
Provide a regular expression to exclude those classes whose fully qualified names match. When this option is repeated, all patterns will be combined using OR semantics.This option can be repeated.
- Returns:
- this list of options
- Since:
- 1.5.20
-
includePackage
Provide a package to be included in the test run. This option can be repeated.This option can be repeated.
- Returns:
- this list of options
- Since:
- 1.5.20
-
excludePackage
Provide a package to be excluded from the test run. This option can be repeated.This option can be repeated.
- Returns:
- this list of options
- Since:
- 1.5.20
-
includeTag
Provide a tag or tag expression to include only tests whose tags match. When this option is repeated, all patterns will be combined using OR semantics.- Returns:
- this list of options
- Since:
- 1.5.20
-
excludeTag
Provide a tag or tag expression to exclude those tests whose tags match. When this option is repeated, all patterns will be combined using OR semantics.- Returns:
- this list of options
- Since:
- 1.5.20
-
includeEngine
Provide the ID of an engine to be included in the test run.This option can be repeated.
- Returns:
- this list of options
- Since:
- 1.5.20
-
excludeEngine
Provide the ID of an engine to be excluded in the test run.This option can be repeated.
- Returns:
- this list of options
- Since:
- 1.5.20
-
config
Set a configuration parameter for test discovery and execution.This option can be repeated.
- Returns:
- this list of options
- Since:
- 1.5.20
-
failIfNoTests
Fail and return exit status code 2 if no tests are found.- Returns:
- this list of options
- Since:
- 1.5.20
-
reportsDir
Enable report output into a specified local directory (will be created if it does not exist).- Returns:
- this list of options
- Since:
- 1.5.20
-
disableAnsiColors
Disable ANSI colors in output (not supported by all terminals).- Returns:
- this list of options
- Since:
- 1.5.20
-
colorPalette
Specify a path to a properties file to customize ANSI style of output (not supported by all terminals).- Returns:
- this list of options
- Since:
- 1.5.20
-
singleColor
Style test output using only text attributes, no color (not supported by all terminals).- Returns:
- this list of options
- Since:
- 1.5.20
-
disableBanner
Disable print out of the welcome message.- Returns:
- this list of options
- Since:
- 1.5.20
-
details
Select an output details mode for when tests are executed.If 'none' is selected, then only the summary and test failures are shown.
Default:
JUnitOptions.Details.TREE
.- Returns:
- this list of options
- Since:
- 1.5.20
-
detailsTheme
Select an output details tree theme for when tests are executed.Default is detected based on default character encoding.
- Returns:
- this list of options
- Since:
- 1.5.20
-