I have a scala application with some test using org.scalatest. To test a test database, these tests need some global configuration (and break).
Please do not tell me that my tests should not fall into the database, and I should do it Java-DAO-Stub-WTF-Overkill-Way β’ :-).
I run tests using SBT, which provides a way to execute code before and after the test:
testOptions in Test += Tests.Setup( () => println("Setup") ) testOptions in Test += Tests.Cleanup( () => println("Cleanup") )
Unfortunately, I cannot access the classes in question. It is not surprising that importing them into build.sbt does not work either.
Any ideas?
installation sbt scalatest
Martin Vielsmaier Dec 13 2018-11-11T00: 00Z
source share