case class Args(reporter: Reporter, stopper: Stopper = Stopper.default, filter: Filter = Filter.default, configMap: ConfigMap = ConfigMap.empty, distributor: Option[Distributor] = None, tracker: Tracker = Tracker.default, chosenStyles: Set[String] = Set.empty, runTestInNewInstance: Boolean = false, distributedTestSorter: Option[DistributedTestSorter] = None, distributedSuiteSorter: Option[DistributedSuiteSorter] = None) extends Product with Serializable
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.
- reporter
the
Reporterto which results will be reported- stopper
the
Stopperthat will be consulted to determine whether to stop execution early.- filter
a
Filterwith which to filter tests based on their tags- configMap
a
ConfigMapof key-value pairs that can be used by the executingSuiteof tests.- 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.- tracker
a
TrackertrackingOrdinals being fired by the current thread.- chosenStyles
a (possibly empty)
SetofStrings specifying the run's chosen styles- runTestInNewInstance
a flag used to pass information between run methods in
OneInstancePerTestandParallelTestExecution.- 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- 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
- Source
- Args.scala
- Exceptions thrown
NullPointerExceptionif any passed parameter isnull.
- Alphabetic
- By Inheritance
- Args
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Args(reporter: Reporter, stopper: Stopper = Stopper.default, filter: Filter = Filter.default, configMap: ConfigMap = ConfigMap.empty, distributor: Option[Distributor] = None, tracker: Tracker = Tracker.default, chosenStyles: Set[String] = Set.empty, runTestInNewInstance: Boolean = false, distributedTestSorter: Option[DistributedTestSorter] = None, distributedSuiteSorter: Option[DistributedSuiteSorter] = None)
- reporter
the
Reporterto which results will be reported- stopper
the
Stopperthat will be consulted to determine whether to stop execution early.- filter
a
Filterwith which to filter tests based on their tags- configMap
a
ConfigMapof key-value pairs that can be used by the executingSuiteof tests.- 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.- tracker
a
TrackertrackingOrdinals being fired by the current thread.- chosenStyles
a (possibly empty)
SetofStrings specifying the run's chosen styles- runTestInNewInstance
a flag used to pass information between run methods in
OneInstancePerTestandParallelTestExecution.- 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- 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
- Exceptions thrown
NullPointerExceptionif any passed parameter isnull.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
val
chosenStyles: Set[String]
a (possibly empty)
SetofStrings specifying the run's chosen stylesa (possibly empty)
SetofStrings specifying the run's chosen styles -
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
val
configMap: ConfigMap
a
ConfigMapof key-value pairs that can be used by the executingSuiteof tests.a
ConfigMapof key-value pairs that can be used by the executingSuiteof tests. -
val
distributedSuiteSorter: Option[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 parallelan 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 -
val
distributedTestSorter: Option[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 completean 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 -
val
distributor: Option[Distributor]
an optional
Distributor, into which to put nestedSuites to be executed by another entity, such as concurrently by a pool of threads.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. -
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
val
filter: Filter
a
Filterwith which to filter tests based on their tagsa
Filterwith which to filter tests based on their tags -
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
val
reporter: Reporter
the
Reporterto which results will be reportedthe
Reporterto which results will be reported -
val
runTestInNewInstance: Boolean
a flag used to pass information between run methods in
OneInstancePerTestandParallelTestExecution.a flag used to pass information between run methods in
OneInstancePerTestandParallelTestExecution. -
val
stopper: Stopper
the
Stopperthat will be consulted to determine whether to stop execution early.the
Stopperthat will be consulted to determine whether to stop execution early. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
val
tracker: Tracker
a
TrackertrackingOrdinals being fired by the current thread.a
TrackertrackingOrdinals being fired by the current thread. -
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )