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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With