q_y4zw
Last Updated: February 25, 2016
·
753
· itaqua

Typesafe Activator's/Play 2.x DB console app testing

When you want to test your models (access to DB's, webservices, etc) using the Typesafe's Activator's/Play 2.x console you need to enable your Application enviroment:

//First Run the Activator
$./activator

//once in he shell tun the console
[my_project] $ console

//load the project!
scala> new play.core.StaticApplication(new java.io.File("."))

//Now load your models or other resources to test.
scala> import models._
//HAVE FUN!
scala> MyModel.count()

1 Response
Add your response

20863

but how do you can automatize it?

over 1 year ago ·