The Artima Developer Community
Sponsored Link

Artima Developer Spotlight Forum
Artima Releases ScalaTest 1.0

3 replies on 1 page. Most recent reply: Nov 4, 2009 2:28 AM by Marcel Lanz

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Artima Releases ScalaTest 1.0 Posted: Oct 12, 2009 1:36 PM
Reply to this message Reply
Advertisement

The promise of increased testing efficiency is at the heart of ScalaTest, an open-source testing framework released today by Artima. ScalaTest makes testing more effective because it provides higher-level abstractions for common test-related developer tasks, says ScalaTest creator Bill Venners:

ScalaTest 1.0 is a Scala application that enables developers to work at a higher level than JUnit and TestNG when writing tests. ScalaTest 1.0 runs on the JVM and can be used to test Java as well as Scala code. In addition to deep integration with JUnit and TestNG, it also supports an Ant task, integrates with maven, and includes improved syntax for popular Java mocking frameworks JMock, EasyMock, and Mockito. Via its JUnit integration ScalaTest can easily be used with IDEs such as Eclipse, NetBeans, and IntelliJ IDEA and productivity tools such as Infinitest.

In addition, ScalaTest also supports multiple testing styles:

Because different developers take different approaches to creating software, ScalaTest is designed to facilitate different styles of testing. ScalaTest provides several traits that you can mix together into whatever combination makes you feel the most productive.

Finally, ScalaTest provides a low-risk way to introduce the Scala language in an organization with large amounts of existing Java code. Properly testing Java code can require three times the lines of code being tested. The Scala language promises a more concise codebase. Combined with its high-level testing abstractions, ScalaTest can make testing Java libraries or classes more effective.

What do you think of using Scala for unit testing both Java and Scala code? And what is your take on ScalaTest's multi-paradigm approach to testing?


Ramzi Ben Yahia

Posts: 23
Nickname: miccheck
Registered: Jul, 2002

Re: Artima Releases ScalaTest 1.0 Posted: Oct 13, 2009 12:34 AM
Reply to this message Reply
I actually use Scala and specs for testing Java code with an inclination to ScalaCheck for random testing. I'm still looking for frameworks which make testing concurrent code easier.
The Scala compiler (2.7.6) is however annoyingly slow.

Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: Artima Releases ScalaTest 1.0 Posted: Oct 13, 2009 6:11 AM
Reply to this message Reply
> I actually use Scala and specs for testing Java code with
> an inclination to ScalaCheck for random testing. I'm still
> looking for frameworks which make testing concurrent code
> easier.
>
Testing of concurrent code is a focus of ScalaTest. The 1.0 release has a class called Conductor that is our first step in that direction. Conductor aims to make it easier to test classes you write that are supposed to be thread safe. Later we're hoping to have a Director that does a similar thing for Actors based code. You can read about it here:

http://www.scalatest.org/scaladoc/doc-1.0/org/scalatest/concurrent/Conductor.html

Also, if you like the BDD style of specs, you can get something similar with WordSpec:

http://www.scalatest.org/getting_started_with_word_spec

With Scaladoc here:

http://www.scalatest.org/scaladoc/doc-1.0/org/scalatest/WordSpec.html

It isn't exactly the same (because it is nicer), but it has some overlap with a specs Specification. There are also a few other BDD styles in ScalaTest that specs does not have. You can see an overview here:

http://www.scalatest.org/getting_started_with_bdd

And don't miss FeatureSpec:

http://www.scalatest.org/getting_started_with_feature_spec

Also, ScalaTest also has integration with ScalaCheck via its Checkers trait:

http://www.scalatest.org/scaladoc/doc-1.0/org/scalatest/prop/Checkers.html

I should put up a page comparing specs and ScalaTest, so it is easier for people to see the differences. Here's Jonas Boner's tweet about the difference:

http://twitter.com/jboner/statuses/4811092811

> The Scala compiler (2.7.6) is however annoyingly slow.
>
It sure is. ScalaTest can run tests in parallel on multiple cores but still sort the results in sequential order afterwords, in an effort to speed up tests the more cores you get, but I think there needs to be some attention to making the compiler go faster after they get the 2.8 release out.

Marcel Lanz

Posts: 4
Nickname: lanz
Registered: Oct, 2005

Re: Artima Releases ScalaTest 1.0 Posted: Nov 4, 2009 2:28 AM
Reply to this message Reply
Don't get me wrong but here is why I think so few will follow the path...

Why you should learn C and not Scala: http://bit.ly/3jVpmW

Flat View: This topic has 3 replies on 1 page
Topic: The Biggest Code Stinkers Previous Topic   Next Topic Topic: PayPal Releases Open Payment Platform and APIs

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use