Error when running Scalatra test on Intellij


I'm trying to run the following test from the within the < a

class Test extends ScalatraFlatSpec with Matchers {
  addServlet(classOf[MainServlet], "/*")

  "Home Page" should "show hello" in {
      status should equal (200);

And IDE is returning me the following error:

java.lang.Exception: No runnable methods
  at org.junit.internal.runners.MethodValidator.validateInstanceMethods(
  at org.junit.internal.runners.MethodValidator.validateMethodsForDefaultRunner(
  at org.junit.internal.runners.JUnit4ClassRunner.validate(
  at org.junit.internal.runners.JUnit4ClassRunner.<init>(
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
  at java.lang.reflect.Constructor.newInstance(
  at org.junit.internal.requests.ClassRequest.buildRunner(
  at org.junit.internal.requests.ClassRequest.getRunner(
  at com.intellij.rt.execution.junit.JUnitStarter.main(
asked by anonymous 14.03.2015 / 19:15

1 answer


I got this same error when I was running the and not as a test of the .

Not always the hits the correct type of test.

If this is the case to fix change from:


And the test will run correctly:

14.03.2015 / 19:15