Skip to content

ScalaTest

Ivan Hop edited this page Sep 5, 2021 · 2 revisions

Running ScalaTest

ScalaTest can be run by the commandline or via the Intellij. For running with Intellij you need the Scala plugin of JetBrains. VerCors uses a lot of memory that is why you have to add an VM option to the ScalaTest template. Go to Run/Debug Configuration. Click on the blue text "Edit configuration templates..." in the left corner. Select ScalaTest. Select Configuration. Set VM options to "-Xss128M". You can run the test by right clicking a test file and selecting the option "Run '{filename}'". To run a single test you can open the file and clicking on the run arrow between the line number and the text of the file. The test files are in "src/test/scala/". Intellij also supports running the test in debug mode by selecting debug mode. Running from the commandline can be done using sbt. The following command runs all the tests. sbt test The following command runs all the test in the file integration.Generated1Tests. sbt "testOnly integration.Generated1Tests"

More settings can be found in https://www.scalatest.org/user_guide/using_scalatest_with_sbt Note that the run settings like classpath and available memory can be different from Intellij and sbt.

Clone this wiki locally