ScalaTest 1.0 Release Notes

Changes in 1.0 (for Scala 2.7.x)

  • Dropped ImpSuite, which had been deprecated for two releases
  • Changed JUnit3Suite so it delegates to JUnit 4's JUnitCore class to run the tests. Before it was simulating JUnit execution without actually using JUnit.
  • Dropped two forms of intercept, which had been deprecated for two releases
  • Made Distributor into a function (breaking change).
  • Made Stopper into a function (breaking change).
  • Renamed Rerunnable into Rerunner and made it a function. Deprecated Rerunnable (breaking change).
  • Renamed main execute method (the one with many parameters) in Suite to run. Changed its signature (breaking change).
  • Added two more final execute methods to Suite that each take a configMap
  • Added a sealed hierarcy of Event classes.
  • Refactored Reporter so that instead of having one method per event type, it has one apply method, which takes an Event (breaking change).
  • Added ResourcefulReporter, which models a Reporter that holds finite, non-memory resources.
  • Added 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 Ordinals.
  • Added Tracker to support the inclusion of good Ordinals in fired Events.
  • Added 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.
  • Renamed groups to tags (deprecated groups)
  • Greatly improved JUnit integration. Added JUnitSuite, JUnitRunner, JUnitWrapperSuite, AssertionsForJUnit, ShouldMatchersForJUnit, MustMatchersForJUnit, JUnitTestFailedError
  • Added -j option to Runner to run JUnit tests with the JUnitWrapperSuite
  • Changed the configuration parameters for 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.
  • Added optional color output to standard out, standard error, and file reporters.
  • Added Reporter configuration parameters for turning off color, showing durations, and showing full stack traces.
  • Added a jvmargs option to the Ant task, which makes it possible to pass args to the underlying JVM (important if you need more memory)
  • Added a 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).
  • Renamed goodies to configMap.
  • Renamed the Ant task from ScalaTestTask to ScalaTestAntTask. Deprecated ScalaTestTask.
  • Added ability to specify the number of threads to use when running tests in parallel, in both Runner and the Ant task.
  • Enhanced 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.
  • Added two new forms to matchers DSL: result should be === 7 and evaluating { "hi".charAt(-1) } should produce [StringIndexOutOfBoundsException].
  • Added support for pending tests.
  • Added pendingUntilFixed method to Suite.
  • Deprecated 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.
  • Added the org.scalatest.concurrent package, which includes Conductor, ConductorFixture, ConductorMultiFixture, and ConductorMethods.
  • Added the org.scalatest.mock package, which includes EasyMockSugar, JMockCycle, JMockCycleFixture, JMockExpectations, and MockitoSugar.
  • Added three new BDD traits: WordSpec, FlatSpec, and FeatureSpec.
  • Added the org.scalatest.fixture package, which includes FixtureSuite, FixtureFunSuite, FixtureSpec, FixtureWordSpec, FixtureFlatSpec, FixtureFeatureSpec, ConfigMapFixture, MultipleFixtureFunSuite, MultipleFixtureSpec, MultipleFixtureWordSpec, MultipleFixtureFlatSpec, and MultipleFixtureFeatureSpec.
  • Added the org.scalatest.verb package to support FlatSpec and WordSpec.
  • Split the BeforeAndAfter trait into BeforeAndAfterEach and BeforeAndAfterAll. Deprecated BeforeAndAfter.
  • Added trait GivenWhenThen.
  • Renamed Group to Tag. Deprecated Group. Also renamed groups method to tags in Suite, and deprecated groups.
  • Added 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.
  • Dropped the apply method that takes a Report (which is no longer used) from Informer, and also dropped the nameForReport method (breaking changes).
  • Added the OneInstancePerTest trait.
  • Added the ParallelTestExecution trait.
  • Added the SequentialNestedSuiteExecution trait.
  • Refactored 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.
  • Renamed 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-2019 Artima, Inc. All Rights Reserved.

artima