Mitch Pronschinske is the Lead Research Analyst at DZone. Researching and compiling content for DZone's research guides is his primary job. He likes to make his own ringtones, watches cartoons/anime, enjoys card and board games, and plays the accordion. Mitch is a DZone Zone Leader and has posted 2578 posts at DZone. You can read more from them at their website. View Full User Profile

ScalaTest 1.0 Release "A Path Forward" to Scala

10.13.2009
| 8991 views |
  • submit to reddit
Scala has made a name for itself recently with the announcement in April that Twitter was in the process of converting their back-end from Ruby to Scala.  The "scalable language" has proven that it can handle code for web giants like Twitter and LinkedIn through its highly performative handling of multi-core apps and its malleable patterns.  "It has the conciseness of a dynamic language like Ruby or Python, but it is statically typed, like Java." says Bill Venners, President of Artima, Inc.  Artima has just released ScalaTest 1.0, an open source test framework for Scala and Java developers.

The two ‘a’s in Scala are soft, pronounced like the two ‘a’s in “Java”. (However, Martin Odersky also acknowledged the “American” pronunciation with the first ‘a’ being a hard ‘a’ as in “scalability”.) -Scala Wiki

New features of ScalaTest 1.0


    •    Sequential reports after a concurrent run
    •    Three new core BDD traits: FlatSpec, WordSpec, and FeatureSpec
    •    Several new FixtureSuite traits that facilitate the functional style of passing fixtures into tests
    •    A Conductor class that facilitates multi-threaded testing of concurrency abstractions


ScalaTest 1.0 integrates with JUnit and TestNG to test Scala or Java code in highly customizable ways.  ScalaTest uses traits which can be combined for efficient testing. There are traits for functional and unit testing, integration and acceptance testing, and high-level property-based testing.  Test-driven development (TDD) and behavior-driven development (BDD) methodologies are also supported in ScalaTest 1.0.

Other ScalaTest features

    •    Supports Ant task
    •    Integrates with maven
    •    Improved syntax for JMock, EasyMock, and Mockito.
    •    Can be used with IDE's (e.g. Eclipse, Netbeans) and productivity tools (e.g. Infinitest) via JUnit integration


Bill Venners told DZone that Scala, JRuby, and Groovy will all reduce the lines of code you need to write, but Scala will run faster because it uses the same static code optimized for JVM.  Venners says he hopes ScalaTest will be "a path forward to using higher level languages" for more productive programming.  Scala, he says, is easy to learn and the program ScalaTest 1.0 is one way to get your feet wet learning the language.