scalatest BeforeAndAfterAll
-
BeforeAndAfterAllscala/scalatest 2023. 3. 21. 20:57
전체 테스트에서 수행 전/후 로 한번씩만 수행 import org.scalatest.BeforeAndAfterAll import org.scalatest.funsuite.AnyFunSuite class MyTest extends AnyFunSuite with BeforeAndAfterAll { override protected def beforeAll(): Unit = println("START") override protected def afterAll(): Unit = println("END") test("test1") { println("test1") } test("test2") { println("test2") } } 출력 결과 START test1 test2 END