ImpSuite
, which had been deprecated for two releasesJUnit3Suite
so it delegates to JUnit 4's JUnitCore
class to run the tests. Before it was simulating JUnit execution without
actually using JUnit.intercept
, which had been deprecated for two releasesDistributor
into a function (breaking change).Stopper
into a function (breaking change).Rerunnable
into Rerunner
and made it a function. Deprecated Rerunnable
(breaking change).execute
method (the one with many parameters) in Suite
to run
. Changed its signature (breaking change).execute
methods to Suite
that each take a configMap
Event
classes.Reporter
so that instead of having one method per event type, it has one apply
method, which takes an Event
(breaking change).ResourcefulReporter
, which models a Reporter
that holds finite, non-memory resources.Ordinal
. Every Event
class includes an Ordinal
so that the events of parallel runs can be sorted
in sequential order. Made changes to all Suite
traits to ensure they fire events with proper Ordinal
s.Tracker
to support the inclusion of good Ordinal
s in fired Event
s.Filter
, which changes how tags to include and exclude are handled. Previously the two include and exclude sets were passed into
Suite
methods, and it was the responsibility of those methods to filter tests correctly. Now the two include and exclude sets are passed to a Filter
,
and the Filter
is passed to the Suite
methods, which can delegate to Filter
to do the filtering.groups
to tags
(deprecated groups
)JUnitSuite
, JUnitRunner
, JUnitWrapperSuite
, AssertionsForJUnit
, ShouldMatchersForJUnit
, MustMatchersForJUnit
, JUnitTestFailedError
Runner
to run JUnit tests with the JUnitWrapperSuite
Reporters
. The old ones will be accepted but have no effect for a two-release deprecation
cycle, after which they will cause Runner
to halt with an error message.Reporter
configuration parameters for turning off color, showing durations, and showing full stack traces.jvmargs
option to the Ant task, which makes it possible to pass args to the underlying JVM (important if you need more memory)fork
option to the Ant task, which makes it possible to run ScalaTest in a separate JVM from Ant (also useful for dealing with memory problems).goodies
to configMap
.ScalaTestTask
to ScalaTestAntTask
. Deprecated ScalaTestTask
.Runner
and the Ant task.Runner
so that it treats a backslash followed by a space as a literal space in a runpath element, rather than a space separating two
runpath elements. This was necessary to allow people to include pathnames in the runpath that included spaces.result should be === 7
and evaluating { "hi".charAt(-1) } should produce [StringIndexOutOfBoundsException]
.pendingUntilFixed
method to Suite
.Report
and SpecReport
. These are no longer used, as they were made obsolete by the Reporter
refactor. Instead
of SpecReport
, the Formatter
and its two subclasses, MotionToSuppress
and IndentedText
are used to format
specification-style output.org.scalatest.concurrent
package, which includes Conductor
, ConductorFixture
, ConductorMultiFixture
,
and ConductorMethods
.org.scalatest.mock
package, which includes EasyMockSugar
, JMockCycle
, JMockCycleFixture
, JMockExpectations
, and MockitoSugar
.WordSpec
, FlatSpec
, and FeatureSpec
.org.scalatest.fixture
package, which includes FixtureSuite
, FixtureFunSuite
, FixtureSpec
, FixtureWordSpec
, FixtureFlatSpec
, FixtureFeatureSpec
, ConfigMapFixture
, MultipleFixtureFunSuite
, MultipleFixtureSpec
, MultipleFixtureWordSpec
, MultipleFixtureFlatSpec
, and MultipleFixtureFeatureSpec
.org.scalatest.verb
package to support FlatSpec
and WordSpec
.BeforeAndAfter
trait into BeforeAndAfterEach
and BeforeAndAfterAll
. Deprecated BeforeAndAfter
.GivenWhenThen
.Group
to Tag
. Deprecated Group
. Also renamed groups
method to tags
in Suite
,
and deprecated groups
.TagAnnotation
to serve as base class for tag annotations for Suite
, however, won't enforce for a two-release deprecation cycle
that tag annotations used on Suite
test methods need to extend TagAnnotation
.apply
method that takes a Report
(which is no longer used) from Informer
, and also dropped
the nameForReport
method (breaking changes).OneInstancePerTest
trait.ParallelTestExecution
trait.SequentialNestedSuiteExecution
trait.TestFailedException
so that it extends StackDepthException
, which mixes in StackDepth
. Added other
StackDepthExceptions
so that other errors in test code beyond just assertion failures will be reported with stack depths:
DuplicateTestNameException
, NotAllowedException
, and TestRegistrationClosedException
. Set aside StackDepth
as a separate trait to support JUnitTestFailedError
.ExecuteAndRun
to AbstractSuite
, and added more methods to it, to facilitate the stackable trait pattern (breaking change).
ScalaTest is brought to you by Bill Venners and Artima.
ScalaTest is free, open-source software
released under the Apache
2.0 license.
If your company loves ScalaTest, please consider sponsoring the project.
Copyright © 2009-2025 Artima, Inc. All Rights Reserved.