Args
Arguments bundle passed to four of ScalaTest's lifecycle methods: run, runNestedSuites,
runTests, and runTest.
The signatures of these methods, defined in trait Suite, are:
def run(testName: Option[String], args: Args) def runNestedSuites(args: Args) def runTests(testName: Option[String], args: Args) def runTest(testName: String, args: Args)
The purpose of bundling these arguments into an Args object instead of passing them in individually is to make the signature
of these four lifecycle methods easier to read, write, and remember, as well as to make the methods more pleasant to override in user code.
- Value parameters:
- chosenStyles
a (possibly empty)
SetofStrings specifying the run's chosen styles- configMap
a
ConfigMapof key-value pairs that can be used by the executingSuiteof tests.- distributedSuiteSorter
an optional
DistributedSuiteSorterused byParallelTestExecutionto ensure the events for the parallel-executed suites are sorted back into sequential order, with a timeout in case a suite takes to long to complete, even when tests are executed in parallel- distributedTestSorter
an optional
DistributedTestSorterused byParallelTestExecutionto sort the events for the parallel-executed tests of one suite back into sequential order on the fly, with a timeout in case a test takes too long to complete- distributor
an optional
Distributor, into which to put nestedSuites to be executed by another entity, such as concurrently by a pool of threads. IfNone, nestedSuites will be executed sequentially.- filter
a
Filterwith which to filter tests based on their tags- reporter
the
Reporterto which results will be reported- runTestInNewInstance
a flag used to pass information between run methods in
OneInstancePerTestandParallelTestExecution.- stopper
the
Stopperthat will be consulted to determine whether to stop execution early.- tracker
a
TrackertrackingOrdinals being fired by the current thread.
- Throws:
- NullArgumentException
if any passed parameter is
null.