SBT Integration Test Support in IDEA

Does IntelliJ IDEA support sbt's model of integration tests?

Currently in IDEA 2017.2.6 if I introduce a compilation error in a scala file under src/it/scala then the syntax highlighter detects a problem but Build Project command on the Build menu thinks the project builds successfully. If I attempt to run a Scala Test that is located under src/it/scala I get an exception:

Unable to load a Suite class. This could be due to an error in your runpath. Missing class: example.MySpec
java.lang.ClassNotFoundException: example.MySpec

 

It seems like IDEA does not fully understand the project layout

6
1 comment

That's right, the IDEA project model doesn't really have the same concept of configurations as sbt does, so only compile and test are fully supported. For such cases it's recommended to run the build from the integrated sbt shell.

0

Please sign in to leave a comment.