Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

playframework2 and Scala - how to launch tests from IDEA?

I got computer-database application from playframework2's example folder:

  1. cd computer-database
  2. play
  3. test

Got: All test passed. (What's is ok)

But when try to launch those tests in IntelliJ IDEA:

  1. cd computer-database
  2. play idea
  3. open project from idea
  4. right mouse click on ModelSpec, then -> Run 'Model Spec' and got message "There is no started application java.lang.RuntimeException: There is no started application"
  5. if: play run (rinning application), then got: Cache play already exists net.sf.ehcache.ObjectExistsException: Cache play already exists
  6. if go to localhost:9000 to make everything be compiled, applying evolution script then got (again):There is no started application java.lang.RuntimeException: There is no started application

Question is: How to launch these tests from IDEA?

like image 933
ses Avatar asked Nov 21 '12 18:11

ses


People also ask

How do I run a Scala test in IntelliJ?

Open the test in the editor, press Ctrl+Shift+F10 or right-click on the test class and from the context menu select Run 'test name'. IntelliJ IDEA creates a run/debug configuration for the test automatically, but if you want to edit settings in your configuration, click Run | Edit Configurations on the main menu.


1 Answers

Try to remove the play-source jar from IDEAs classpath.

You find it under "project strucure -> Libraries"

like image 122
ingara Avatar answered Nov 02 '22 04:11

ingara