Open Harikiranvuyyuru opened 8 years ago
It is because test
is hardcoded in testNGSettings
, try expanding testNGSettings
to its source (https://github.com/sbt/sbt-testng/blob/094f749250b4b18c613e7d7ce801c4b8abc567e0/plugin/src/main/scala/de/johoop/testngplugin/TestNGPlugin.scala) and fix scopes:
.settings(
resolvers += Resolver.sbtPluginRepo("releases"), // why is that necessary, and why like that?
testNGVersion := testNGV,
testNGOutputDirectory := ((crossTarget).value / "testng").absolutePath,
testNGParameters := Seq(),
testNGSuites := Seq(((resourceDirectory in IntegrationTest).value / "testng.yaml").absolutePath),
libraryDependencies ++= Seq(
"org.testng" % "testng" % (testNGVersion).value % "test,it",
"org.yaml" % "snakeyaml" % "1.17" % "test,it",
"de.johoop" %% "sbt-testng-interface" % "3.0.3" % "test,it"),
testFrameworks += TestNGFrameworkID,
testOptions += Tests.Argument(
TestNGFrameworkID, ("-d" +:
(testNGOutputDirectory).value +: (testNGParameters).value) ++
(testNGSuites).value :_*
)
)
I want to run the integration tests located at path src/it/java using sbt task : sbt it:test
I have provided the following settings in my build.sbt :
Integration tests are not executed when I run the sbt task: it:test
Is there a way to run integration tests located in src/it through this plugin?