Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JUnit Tests Ignored when Forking is Enabled #80

Open
malaverdiere opened this issue Mar 16, 2018 · 0 comments
Open

JUnit Tests Ignored when Forking is Enabled #80

malaverdiere opened this issue Mar 16, 2018 · 0 comments

Comments

@malaverdiere
Copy link

I have a Java project that I'm building with SBT. The only Scala code is in the tests.
I need to run some slow tests in a separate process, with a high memory option (-Xmx).
I want to do that using forking. However, this does not work, as JUnit tests are ignored.

This is an excerpt of my build.sbt:

crossPaths := false
scalaVersion := "2.12.4"
autoScalaLibrary := false
sbtVersion := "1.1.1"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.3" % "test"
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.13.5" % "test"
libraryDependencies += "junit" % "junit" % "4.12" % "test"
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test"
testOptions += Tests.Argument(TestFrameworks.JUnit, "-q")
Test / parallelExecution := false

This configuration makes my jUnit tests run when I do sbt test.
If I add fork in Test := true, then only my ScalaTest tests execute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant