I am trying to implement tests with scalatest 3.0.5. I created my abstract class defining my setup and my first concrete test class, as suggested on the official website.
abstract class TestSpec extends FunSuite
class MyFirstTest extends TestSpec {
test("This is a test") {assert(1 == 1)}
}
But then Intellij shows the following error :
MyFirstTest must either be declared abstract or implement abstract member 'getTestNameForReport(s:String):String' in 'org.scalatest.Suite'
After reading source code, FunSuite is a concrete class.
I tried changing scalatest version to 2.2.6, but the same problem occures. I tried to implement the abstract members but IntelliJ asks to override some methods like execute
, so this does not seem to be a great idea.
For the records, I am using Maven to build my project, and it builds perfectly. The problem is that I cannot run my tests from the IDE as a warning is displayed.
I ended up solving my problem by deleting my project and creating a new one from this archetype with maven. I think my problem was because I messed up my pom somehow.
If you encounter a similar issue, here are some possible fixes (thanks to @Argurth):