class ScalaTestFramework extends scalatools.testing.Framework
Class that makes ScalaTest tests visible to SBT (prior to version 0.13).
To use ScalaTest in SBT, you should add ScalaTest as dependency in your SBT build file, the following shows an example for using ScalaTest 2.0 with Scala 2.10.x project:
"org.scalatest" % "scalatest_2.10" % "2.0" % "test"
To pass argument to ScalaTest from SBT, you can use testOptions
:
testOptions in Test += Tests.Argument("-u", "target/junit") // Use JUnitXmlReporter
If you are using multiple testing frameworks, you can pass arguments specific to ScalaTest only:
testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-u", "target/junit") // Use JUnitXmlReporter
Supported arguments
Integration in SBT 0.13 supports same argument format as Runner
,
except the following arguments:
-R
-- runpath is not supported because test path and discovery is handled by SBT-s
-- suite is not supported because SBT'stest-only
serves the similar purpose-A
-- again is not supported because SBT'stest-quick
serves the similar purpose-j
-- junit is not supported because in SBT different test framework should be supported by its correspondingFramework
implementation-b
-- testng is not supported because in SBT different test framework should be supported by its correspondingFramework
implementation-P
-- concurrent/parallel is not supported because parallel execution is controlled by SBT.-q
is not supported because test discovery should be handled by SBT, and SBT's test-only or test filter serves the similar purpose-T
is not supported because correct ordering of text output is handled by SBT-g
is not supported because current Graphic Reporter implementation works differently than standard reporter
It is highly recommended to upgrade to SBT 0.13 to enjoy the best of ScalaTest 2.0 SBT integration. Due to limitations
in old Framework API (prior to SBT 0.13), it is hard to support ScalaTest features in the most efficient way. One example is
the nested suites, where in old Framework API they has to be executed sequentially, while new Framework API (included in SBT
0.13) the concept of nested Task
has enabled parallel execution of ScalaTest's nested suites.
- Source
- ScalaTestFramework.scala
- Alphabetic
- By Inheritance
- ScalaTestFramework
- Framework
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ScalaTestFramework()
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
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
name(): String
Returns
"ScalaTest"
, the human readable name for this test framework.Returns
"ScalaTest"
, the human readable name for this test framework.- Definition Classes
- ScalaTestFramework → Framework
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
testRunner(testLoader: ClassLoader, loggers: Array[Logger]): ScalaTestRunner
Returns an
org.scalatools.testing.Runner
that will load test classes via the passedtestLoader
and direct output from running the tests to the passed array ofLogger
s.Returns an
org.scalatools.testing.Runner
that will load test classes via the passedtestLoader
and direct output from running the tests to the passed array ofLogger
s.- Definition Classes
- ScalaTestFramework → Framework
-
def
tests(): Array[Fingerprint]
Returns an array containing fingerprint for ScalaTest's test, which are classes whose superclass name is
org.scalatest.Suite
or is annotated withorg.scalatest.WrapWith
.Returns an array containing fingerprint for ScalaTest's test, which are classes whose superclass name is
org.scalatest.Suite
or is annotated withorg.scalatest.WrapWith
.- Definition Classes
- ScalaTestFramework → Framework
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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( ... )