Over a million developers have joined DZone.

ScalaTest 1.0 Release "A Path Forward" to Scala

DZone's Guide to

ScalaTest 1.0 Release "A Path Forward" to Scala

· Java Zone ·
Free Resource

Delivering modern software? Atomist automates your software delivery experience.

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.

Start automating your delivery right there on your own laptop, today! Get the open source Atomist Software Delivery Machine.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}