Run the passed suite, optionally passing in a test name and config map.
Run the passed suite, optionally passing in a test name and config map.
This method will invoke execute
on the passed suite
, passing in
the specified (or default) testName
and configMap
and the configuration values
passed to this Shell
's constructor (colorPassed
, durationsPassed
, shortStacksPassed
,
fullStacksPassed
, and statsPassed
).
Run the suites whose fully qualified names are passed as arguments.
Run the suites whose fully qualified names are passed as arguments.
This method will invoke the main method of org.scalatest.tools.Runner
, passing
in "-R ."
to set the runpath to the current directory, "-o"
to select the
standard out reporter, and each argument preceded by -s
. For example, this run
command:
$ scala -cp scalatest-RELEASE.jar org.scalatest.run ExampleSpec
Has the same effect as this Runner
command:
$ scala -cp scalatest-RELEASE.jar org.scalatest.tools.Runner -R . -o -s ExampleSpec
Singleton object providing an
apply
method for the ScalaTest shell and amain
method for ScalaTest's simple runner.The
apply
method can be used in the ScalaTest Shell (its DSL for the Scala interpreter) in this way:The last command is calling the
apply
method on therun
singleton object. In other words, you could alternatively call it this way:The
run
singleton object also serves a different purpose. Itsmain
method allows users to "run"run
as a Scala application. ScalaTest'sRunner
application is very powerful, but doesn't provide the simplest out-of-box experience for people trying ScalaTest for the first time. For example, to run anExampleSpec
in the unnamed package from the directory where it is compiled withRunner
's standard out reporter requires this command:$ scala -cp scalatest-RELEASE.jar org.scalatest.tools.Runner -R . -o -s ExampleSpec
Running it with the
run
application is simpler:$ scala -cp scalatest-RELEASE.jar org.scalatest.run ExampleSpec