당신은 시험이 사양에 sequential
을 추가하여 순차적으로 실행해야 함을 지정할 수 있습니다. 당신이 단위 스타일의 테스트를 사용하는 경우
, 당신의 검사 결과 위의 라인 (examples borrowed from specs docs을) 문 sequential
을 넣어 : 당신이 수용 스타일의 테스트를 사용하는 경우, 단지 is
의 정의 내에서 순차적를 추가
import org.specs2.mutable._
class HelloWorldSpec extends Specification {
sequential
"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")
}
}
}
보조 노트으로
import org.specs2._
class HelloWorldSpec extends Specification { def is =
sequential ^
"This is a specification to check the 'Hello world' string" ^
p^
"The 'Hello world' string should" ^
"contain 11 characters" ! e1^
"start with 'Hello'" ! e2^
"end with 'world'" ! e3^
end
def e1 = "Hello world" must have size(11)
def e2 = "Hello world" must startWith("Hello")
def e3 = "Hello world" must endWith("world")
}
, 당신은 아마보다는 소프트웨어에 오류에서 스택 오버플로 오류를 얻고있다 테스트가 너무 길다.
에 유래에 오신 것을 환영합니다. 코드의 관련 부분만큼 시도한 것을 게시 할 것을 고려하십시오. 그렇지 않으면 아무도 당신을 도울 수 없을 것입니다 –