简体   繁体   中英

Scala test cannot find any test to run

I am trying to run some test in scala play framework. Here is the code that I have written

package com.sentrana.mmcore.integrationTests

import org.specs2.mutable._
import org.specs2.runner._
import org.junit.runner._
import play.api.test._
import play.api.test.Helpers._
import play.api.libs.json._

class ApplicationSpec extends Specification with Tags {
  "Application" should {
    "work" in new WithApplication {
      route(FakeRequest(GET, "/boum")) must beNone
    }
  }

}

This is the command that I am using to run the test -

test-only com.sentrana.mmcore.integrationTests.ApplicationSpec

I am not getting any error. But it is showing me that 0 tests have been.

If you add you test using IntellijIDEA make sure that the file has .scala extension. The IDE does not show errors but the activator cannot find the test because it is searching for scala files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM