【发布时间】:2016-07-24 16:39:54
【问题描述】:
在 sbt 中,要在保存时运行测试,我会执行“~test”。当我想在保存时运行应用程序时,我会执行“~run”。如果我想先运行测试,然后在保存时运行应用程序,该怎么办?
我尝试了“~ all test run”,但它给了我一个错误
> ~ all test run
[error] Cannot mix input tasks with plain tasks/settings. Input task(s):
[error] ScopedKey(Scope(Select(ProjectRef(file:/home/johnreed/sbtProjects/activatorProjects/hello-scala/,hello-scala)),Select(ConfigKey(compile)),Global,Global),run)
[error] Task(s)/setting(s):
[error] ScopedKey(Scope(Select(ProjectRef(file:/home/johnreed/sbtProjects/activatorProjects/hello-scala/,hello-scala)),Select(ConfigKey(test)),Global,Global),test)
[error]
[error] all test run
附言我希望能够通过单击绿色的“运行”按钮自动连续运行测试并从 IntelliJ 社区版运行 Play 应用程序。
【问题讨论】:
-
您可以使用play's dev mode hooks挂钩测试任务。
标签: scala intellij-idea playframework sbt typesafe-activator