- 授权协议: GPL
- 开发语言: Scala
- 操作系统: 跨平台
- 软件首页: http://specs2.org
- 软件文档: http://etorreborre.github.io/specs2/guide/org.specs2.UserGuide.html
软件介绍
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")
}
}
}
