Eclipse中的Scalatest规范输出
我在Eclipse中使用Scala测试规范和junitestrunner。规格输出到哪里去了?有没有办法把它传送到控制台 例如:Eclipse中的Scalatest规范输出,scala,scalatest,scala-ide,Scala,Scalatest,Scala Ide,我在Eclipse中使用Scala测试规范和junitestrunner。规格输出到哪里去了?有没有办法把它传送到控制台 例如: val p = new SQLParser describe("given a sql string with an order clause") { describe("(when direction is asc)") { val sql = "select name from users order by name asc"
val p = new SQLParser
describe("given a sql string with an order clause") {
describe("(when direction is asc)") {
val sql = "select name from users order by name asc"
it("should be parsed into an Asc object containing the given field") {
val query = p.parse(sql).get
query.operation should be (Select("name"))
query.from should be (From("users"))
query.order should be (Option(Asc("name")))
}
}
}
仅给出第一个“描述”的规范输出
这就是您希望看到的所有内容,但我希望看到所有内容。输出将在JUnit视图中显示。如果我使用:
import org.scalatest.Spec
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
class ExampleSpec extends Spec {
describe("A Stack") {
it("should pop values in last-in-first-out order")(pending)
it("should throw NoSuchElementException if an empty stack is popped")(pending)
}
}
然后作为JUnit运行,我从JUnit视图获得以下输出:
这不是你想要的吗