views:

2071

answers:

3
+11  Q: 

Unit testing Scala

Hi!

I just recently started learning the Scala language and would like to do it in TDD-way. Could you share your experiences on the unit testing frameworks there are for Scala and the pros/cons of them.

I'm using IntelliJ IDEA for Scala development, so it would be nice to be able to run the tests with IDE-support.

+6  A: 

Have you looked at ScalaTest ?

I've not used it, but it comes from Bill Venners and co at Artima, and consequently I suspect it'll do the job. It doesn't appear to have IDE integration, however.

This blog entry is a little old, but suggests that TestNG is the best option for testing Scala. TestNG will certainly have IDE integrations.

Brian Agnew
+1  A: 

You could also check out Specs it's fairly complete and IIRC is heavily used as part of Lift.

Saem
+8  A: 

Hi,

I'm the author of specs. If you're a Intellij user, I advise you to mix-in in the org.specs.runner.ScalaTest trait to your specification and run it as a ScalaTest suite.

If you have any issue with that, or anything else feel free to send a message to the specs-users mailing list.

Eric.

Eric
Running Specs is now directly supported by the Scala plugin for IDEA 9 - the integration is seamless.
Palimondo