|
ScalaTest 0.9.2
|
|
org/scalatest/Distributor.scala]
trait
Distributor
extends AnyRef
A object that facilitates concurrent and/or distributed execution of Suites.
An optional Distributor is passed to the execute method of Suite. If a
Distributor is indeed passed, trait Suite's implementation of execute will
populate that Distributor with its nested Suites (by passing them to the Distributor's
put method) rather than executing the nested Suites directly. It is then up to another party or parties
to execute those Suites.
If you have a set of nested Suites that must be executed sequentially, you can override runNestedSuites and
call this trait's implementation, passing in None for the Distributor. For example:
override protected def runNestedSuites(reporter: Reporter, stopper: Stopper,
includes: Set[String], excludes: Set[String], properties: Map[String, Any],
distributor: Option[Distributor]) {
// Execute nested suites sequentially
super.runNestedSuites(reporter, stopper, includes, excludes, properties, None)
}
Implementations of this trait must be thread safe.
| Method Summary | |
abstract def
|
put
(suite : Suite) : Unit
Puts a
Suite into the Distributor. |
| Methods inherited from AnyRef | |
| getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
| Methods inherited from Any | |
| ==, !=, isInstanceOf, asInstanceOf |
| Method Details |
Suite into the Distributor.suite - the Suite to put into the Distributor.NullPointerException - if suite is null.|
ScalaTest 0.9.2
|
|