Last Updated: February 25, 2016
·
954
· 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

but how do you can automatize it?

over 1 year ago ·