final class JUnitRunner extends Runner
A JUnit Runner
that knows how to run any ScalaTest Suite
.
This enables you to provide a JUnit RunWith
annotation on any
ScalaTest Suite
. Here's an example:
import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.FunSuite @RunWith(classOf[JUnitRunner]) class MySuite extends FunSuite { // ... }
This RunWith
annotation will enable the MySuite
class
to be run by JUnit 4.
- Source
- JUnitRunner.scala
- Alphabetic
- By Inheritance
- JUnitRunner
- Runner
- Describable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
val
getDescription: Description
Get a JUnit
Description
for this ScalaTestSuite
of tests.Get a JUnit
Description
for this ScalaTestSuite
of tests.return a
Description
of this suite of tests -
def
run(notifier: RunNotifier): Unit
Run this
Suite
of tests, reporting results to the passedRunNotifier
.Run this
Suite
of tests, reporting results to the passedRunNotifier
. This class's implementation of this method invokesrun
on an instance of thesuiteClass
Class
passed to the primary constructor, passing in aReporter
that forwards to theRunNotifier
passed to this method asnotifier
.- notifier
the JUnit
RunNotifier
to which to report the results of executing this suite of tests
- Definition Classes
- JUnitRunner → Runner
-
def
testCount(): Int
Returns the number of tests that are expected to run when this ScalaTest
Suite
is run.Returns the number of tests that are expected to run when this ScalaTest
Suite
is run.- returns
the expected number of tests that will run when this suite is run
- Definition Classes
- JUnitRunner → Runner