Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Scala unit test tool that integrates well with Maven?

My company is beginning to write some code using Scala. I've been moved onto this project, and am a big fan of TDD, so I would like to get a unit-testing framework in place. However, the build system we're using for this project is Maven, and that's not going to change, for a variety of reasons.

I've looked at both ScalaTest and ScalaCheck, and both seem to have issues with Maven integration. Various forum posts I've seen in Google searches indicate that some of the Suites included with ScalaTest won't run under the maven-scala-plugin, and I haven't been able to find any information at all on running ScalaCheck in Maven's test goal.

Can anyone either point me at a way to get ScalaTest/ScalaCheck running reliably with Maven, or suggest an alternative?

like image 758
MattK Avatar asked Jul 07 '09 16:07

MattK


1 Answers

ScalaTest 1.0 has:

org.scalatest.junit.JUnitRunner

You can use it with JUnit's RunWith annotation. Maven likes that. There's also a Maven plugin now for ScalaTest, written by Jon-Anders Teigen. Right now you'll need to grab it from Jon-Anders github page:

http://github.com/teigen/maven-scalatest-plugin

Soon we plan to deploy it "officially" in a Maven repository.

Plugin officially deployed into Maven Central.

like image 99
Bill Venners Avatar answered Nov 15 '22 16:11

Bill Venners