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
NullArgumentExceptionif 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
NullArgumentExceptionif 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]
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- val configMap: ConfigMap
- val distributedSuiteSorter: Option[DistributedSuiteSorter]
- val distributedTestSorter: Option[DistributedTestSorter]
- val distributor: Option[Distributor]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val filter: Filter
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val reporter: Reporter
- val runTestInNewInstance: Boolean
- val stopper: Stopper
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val tracker: Tracker
-
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
- @native() @throws( ... )