0

While developing a test suite for a class, I've began running into situations where ScalaTest would only run a single test, or exclude some of them.

corazza
  • 31,222
  • 37
  • 115
  • 186

1 Answers1

0

Eclipse was saving different runs of the tests as different run configurations, and depending on how I ran it (usually using Ctrl+F11), it selected specific tests in the suite, not the whole suite class, and saved those run configurations.

The solution was to delete the new run configurations, and simply right-click the name of the test suite class in the editor, and select Run as -> ScalaTest - Suite. More information

Additionally, you can tweak how Eclipse interprets the run command/shortcut, when you go to Preferences -> Launching:

enter image description here

I have selected Always launch the previously launched application, and now Eclipse isn't trying to dynamically create run configurations anymore. When I switch between the main application or test suits, I have to do it manually using the dropdown near the green Run buton.

corazza
  • 31,222
  • 37
  • 115
  • 186