specs2 - Scala 软件测试库
GPL
跨平台
Scala
软件简介
Specs2是一个用于编写可执行软件说明的Scala库。可以用它来编写可知性测试和性能测试。
示例代码:
import org.specs2.mutable._
class HelloWorldSpec extends Specification {
"The 'Hello world' string" should {
"contain 11 characters" in {
"Hello world" must have size(11)
}
"start with 'Hello'" in {
"Hello world" must startWith("Hello")
}
"end with 'world'" in {
"Hello world" must endWith("world")
}
}
}