ScalaTest Release Notes

Changes in 1.7.2 (for Scala 2.9.0+ and Scala 2.8.1+)

ScalaTest 1.7.2 is identical to 1.7.1 except for two changes: the argument "sequential" is ignored to facilitate Play 2.0 integration and a bug in the ScalaTest Framework has been fixed. The bug that was fixed was that when running with sbt, ScalaTest would keep a thread going after the tests were completed. This thread is now not created in the first place.

Changes in 1.7.1 (for Scala 2.9.0+ and Scala 2.8.1+)

ScalaTest 1.7.1 is identical to 1.7 except for one change: the Guice dependency in the pom.xml file has been made optional. This minor pom file error in 1.7 unfortunately caused a much more serious deployment problem: the wrong jar files were deployed to scala-tools.org (mirrored on Maven Central) under artifact IDs scalatest_2.8.2, scalatest_2.9.0-1, and scalatest_2.9.1. The jar files for 1.7.RC2 were incorrectly deployed instead. We redeployed correct 1.7 jar files over the top as soon as we discovered the problem, but because the incorrect jars escaped and were in the repository for a while we released 1.7.1 one day later so people can be sure they are getting good jar files from the Maven repositories.

To see the changes in 1.7.1 from the previous releases (1.6.1 and 1.5.1), therefore, look at the release notes for 1.7.

Changes in 1.7 (for Scala 2.9.0+ and Scala 2.8.1+)

ScalaTest 1.7 is source (but not necessarily binary) compatible with previous releases. To upgrade from 1.5.1 or 1.6.1, you should only need to do a clean build.

This release includes the following enhancements, bug fixes, dependency changes, and deprecations:

Enhancements:

  • Added trait Inside, which lets you make assertions about values extracted from an object via a pattern match
  • Added traits OptionValues, EitherValues, and PartialFunctionValues, which allow you to make one-liner assertions about values that should exist in Options, Eithers, and PartialFunctions
  • Added extra methods on MockitoSugar for new mock methods added to Mockito
  • Added WrapWith annotation to enable ScalaTest to run non-Suites, similar to JUnit's RunWith annotation
  • Added trait NonImplicitAssertions, which turns off the lone implicit conversion you get by default in a ScalaTest suite
  • Made Event and Ordinal serializable, as well as internal implementations of Rerunner, to make it easier to run tests in a different VM across a network
  • OSGI-enabled ScalaTest's jar file
  • Added companion objects for EasyMockSugar and MockitoSugar, selfless traits
  • Improved Scaladoc examples for shared tests, removing dependency on test order in the SharedBehaviors traits

Bug fixes

  • Made OneInstancePerTest report tests tagged as ignored as Ignored rather than running them. To fix this, had to change the semantics of run slightly, but in a way that is unlikely to break any user code. Now if you pass the name of a test marked as ignored to Suite.run, the test will be reported as ignored. Previously it would be run even though it was marked as ignored. So now ignore always means ignore (and that is arguably an improvement because it is more consistent). The upshot is that if you want to run a test marked as ignored, you need to take the ignore annotation off, then run it.
  • Added a hack to fire a test failed event for a test named "!!! Suite Aborted !!!" in the case of a SuiteAborted event when running with sbt. Will eventually help enhance sbt's Framework to do this the right way, but for now, at least sbt won't think that nothing went wrong.
  • Fixed bug in GeneratorDrivenPropertyChecks. Previously if you supplied generator, name string tuples to forAll, and the property check failed, the names you supplied wouldn't show up in the error message. Instead the error message would just show generic names arg0, arg1, etc. Now it shows the supplied names.

Dependency Changes

  • Upgraded EasyMock from 3.0 to 3.1
  • Upgraded Added a dependency that TestNG needed on Guice 3.0
  • Upgraded JUnit from 4.4 to 4.10
  • Upgraded TestNG from 5.7 to 6.3.1. This was the tricky one, because some binary incompatible things happened in TestNG between 5.7 and 6.3.1. We used reflection internally to deal with it dynamically, so you should be able to still use older versions of TestNG without getting ClassNotFoundErrors

Deprecations

  • Deprecated -t in favor of -b in Runner, for running TestNG test suites (-t will still work during deprecation cycle, but you'll get a deprecation warning.)
  • Deprecated Rerunner with a note asking if anyone is using it. If we don't hear back that anyone is using it, there's a good chance we'll remove it in 2.0 (Rerunner will still work during deprecation cycle, but you'll get a deprecation warning.)
  • Deprecated org.scalatest.fixture.FixtureX in favor of org.scalatest.fixture.X. So fixture.FixtureWordSpec became fixture.WordSpec, fixture.FixtureFunSuite became fixture.FunSuite, etc. (The old names will still work during deprecation cycle, but you'll get a deprecation warning until you change the names.)
  • Deprecated that in favor of which in WordSpec and fixture.WordSpec (that will still work during the deprecation cycle, but you'll get a deprecation warning until you change uses to which. We plan to reuse that for a different purpose in the future.)
  • Deprecated org.scalatest.Spec in favor of org.scalatest.FunSpec, and org.scalatest.fixture.FixtureSpec in favor of org.scalatest.fixture.FunSpec. (The old names will still work during the deprecation cycle, but you'll get a deprecation warning. We plan to reuse Spec for a different purpose in the future.)

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-2024 Artima, Inc. All Rights Reserved.

artima