Missing classes in integration test sbt config
See original GitHub issueHello, I am trying to setup metals with bloop at vscode and my build.sbt looks like this
lazy val root = (project in file("."))
.configs(IntegrationTest)
.settings(
name := "retro-service",
Defaults.itSettings,
libraryDependencies ++= Dependencies.libraries,
outputStrategy := Some(StdoutOutput),
inThisBuild(List(organization := "com.mycompany", scalaVersion := "2.12.10"))
)
dependencyClasspath in IntegrationTest :=
(dependencyClasspath in IntegrationTest).value ++ (exportedProducts in Test).value
onLoad in Global ~= (_ andThen ("loadEnv" :: _))
fork := true
run / fork := false
run / envVars := loadEnv.value._2
Test / envVars := loadEnv.value._2
IntegrationTest / parallelExecution := false
IntegrationTest / envVars:= loadEnv.value._2
IntegrationTest / dependencyClasspath :=
(IntegrationTest / dependencyClasspath).value ++ (Test / exportedProducts).value
But VScode is saying that a Class from /test is not on scope of a class at /it
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Per-configuration classpath dependencies doesn't work with ...
I'm trying to set up a SBT project configuration where the test classes are part of the exercises project while the answers project...
Read more >BSP - SBT : Integration tests can't be launched in Intellij IDEA
Unable to load a Suite class. This could be due to an error in your runpath. Missing class: org.some.IntegrationTest. Kotlin detected.
Read more >sbt Reference Manual — Testing
Test is the configuration and means that ScalaCheck will only be on the test classpath and it isn't needed by the main sources....
Read more >SBT Plugin - Gatling
'Test' vs 'Integration Tests' configurations#. This plugin offers two different custom SBT configurations, named Gatling and GatlingIt . They are tied to ...
Read more >Using ScalaTest with sbt
To see classpath that sbt uses to lookup for test classes, you can use ... Each reporter argument on the command line can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@matheussbernardo Sorry for the late reply. The sbt build code that you’ve shared looks a little bit hacky in that you only express the dependency between the integration test project and the test project via
exportedProducts
. You should instead express the dependency at the project level so that bloop can pick it up. You can do that by writing this instead:You need to make sure you replace any reference to
IntegrationTest
byDeepIntegrationTest
. With that, bloop should correctly infer that your it sources depend on your test sources.@maciejbak85 Hello, Here it worked.