I am writing my unit test scripts for a Java project using Scala (JUnit 4). I run tests using Maven.
I wrote a class src/test/scala/com.xxx.BaseTestfor tests to provide some common functions ( @BeforeClassetc.), but there are no real cases @Test.
Whenever I run tests using mvnthe command line, he insists on trying to find tests in the class BaseTestand gets an error because they are not there.
Besides usage @Ignore, is there a way to get Maven / Scala / Surefire not to try to run the class BaseTest? Adding is @Ignorenot a big deal, but my test run shows another test than what I actually have with the word “Missed: 1”.
The UPDATE . I have found a solution. I renamed BaseTestto Base; Maven is now ignoring this. Is there another way?
Ralph source
share