sbt testin fail in specs2

15 views
Skip to first unread message

Sajith Vijesekara

unread,
Jun 25, 2013, 1:31:13 AM6/25/13
to simple-b...@googlegroups.com
hi 

when i run test classes in sbt i got these error 
       No tests to run for transport/test:test
in the target file i couldn't find any test classes.
what is the problem in code or sbt??

This is my code

class TaxiJsonSpecs extends Specification {

  "TaxiJsonSpec" should {
    import spray.json._
    "serialize an taxi" in {

      val taxi: Taxi = TaxiJson(
        licensePlateNumber = "WE1443",
        doorNumber = "02",
        posId = "14445896",
        chassisNumber = "5",
        taxiType = "SW"
      )

      val jsonStr = taxi.toJson.prettyPrint

      val jValue = JsonExtractor(jsonStr)

      jValue.extractOpt[String]("WE1443") must beSome(taxi.licensePlateNumber)
      jValue.extractOpt[String]("02") must beSome(taxi.doorNumber)
      jValue.extractOpt[String]("14445896") must beSome(taxi.posId)
      jValue.extractOpt[String]("5") must beSome(taxi.chassisNumber)
      jValue.extractOpt[String]("aa") must beSome(taxi.taxiType)


    }
}
}

Robin Green

unread,
Jun 26, 2013, 2:49:08 AM6/26/13
to simple-b...@googlegroups.com
In the sbt console, what is the output of

show test:unmanaged-source-directories

? This will show the directory where sbt expects to find your test source file (unless the test source file is generated, in which case you need show test:managed-source-directories).
Notice:  This email is confidential and may contain copyright material of Ocado Limited (the "Company"). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company.

If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses.

Company reg. no. 3875000.

Ocado Limited
Titan Court
3 Bishops Square
Hatfield Business Park
Hatfield
Herts
AL10 9NE
Reply all
Reply to author
Forward
0 new messages