Setting up multiple test folders in a SBT project

蹲街弑〆低调 提交于 2020-01-14 07:45:09

问题


We'd like to set up our SBT project so that we have multiple test folders as opposed to one. So we'd like to see:

  • root
    • src
      • test
        • scala
          • unit
          • functional

How would we configure our SBT project file paths to do this?


回答1:


SBT 0.9.x:

(sourceDirectories in Test) := Seq(new File("src/test/scala/unit"), 
                                   new File("src/test/scala/functional"))

SBT 0.7.x:

override def testSourceRoots = ("src" / "test") +++ 
       "scala" +++ ("unit" / "functional")


来源:https://stackoverflow.com/questions/6212540/setting-up-multiple-test-folders-in-a-sbt-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!