'Unable to load a Suite class' while running ScalaTest in IntelliJ

后端 未结 12 1043
有刺的猬
有刺的猬 2021-01-01 10:07

I\'m having some issues today with running a simple TestKit test in Intellij. The tests are for Scala code (I have the Scala plug-in for Intellij) and are based on Ray Roes

相关标签:
12条回答
  • 2021-01-01 10:52

    In my case, I was missing the Scala facet in my module.

    https://blog.jetbrains.com/scala/2010/09/02/project-configuration-explained/

    I got rid of the error once I configured module properly.

    0 讨论(0)
  • 2021-01-01 10:53

    My project already had the setup as mentioned by @Rustam Aliyev. Still was getting the same exception. Rebuilding the project did not help either. Quite weird ; but Restarting the IDE helped to solve the issue

    0 讨论(0)
  • 2021-01-01 10:53

    You need to set up the Scala SDK. 1.) Usually, intelliJ will ask you by showing a message on right hand corner of your editor 2.) You can do it by yourself as mentioned on the https://www.jetbrains.com/help/idea/discover-intellij-idea-for-scala.html

    0 讨论(0)
  • 2021-01-01 10:57

    This is how I solved same exception:

    --> Right click on your project folder in IDE:
    

    --> Click Add Framework Support
    --> Then Check Scala
    --> Click OK
    
    0 讨论(0)
  • 2021-01-01 11:01

    If you are using IntelliJ to run scalatest make sure the class paths are correct. For example:

     /dummyApp 
    

    your build.sbt should look like, name := "dummyApp". If you name it name := "dummy App" you will get errors.

    0 讨论(0)
  • 2021-01-01 11:01

    I am using the multi maven module and tried all possibilities here but not able to fix this. But for me I closed the complete IntelliJ -> removed .idea folder -> deleted managed projects from recent projects window.-> reimport the project did the job.

    0 讨论(0)
提交回复
热议问题