dimanche 4 juin 2017

How to bundle integration tests into jar so they can be run with scalatest runner

I can run integration tests in sbt using it:test. I would like to assemble my integrations tests into a fat jar so other users can run them with the ScalaTest runner org.scalatest.tools.Runner and not have to learn sbt. I am unable to get the classes and dependencies to be part of the fat jar. Below is my build.sbt. Test files are under src/it/scala/... Thanks for the help.

name := "it-test"

organization := "com.xxx.qa"

version := "1.0"

scalaVersion := "2.11.8"

libraryDependencies ++= Seq(
  "org.scalatest" %% "scalatest" % "2.1.6",
  "junit" % "junit" % "4.11" % "test",
  "com.novocode" % "junit-interface" % "0.10" % "test",
  "com.github.nscala-time" %% "nscala-time" % "1.4.0",
  "com.typesafe" % "config" % "1.3.0"
)

Defaults.itSettings

Aucun commentaire:

Enregistrer un commentaire