How do I run Play spec tests?

Hi,
I'm working on a Play scala web application. I have a spec test, which works fine if I run it with the play console.

Is there any way to compile and run it using IntelliJ?

If I start the compile server (without any play console running) I get a class not found error after starting the spec test run config.

Should IntelliJ be able to run play spec tests without the help of the Play console?

I'm using the latest 13.1 EAP and Scala plugin.

Doing a project rebuild shows these messages:

Information:Play 2 Compiler: [33m       _

Information:Play 2 Compiler: _ __ | | __ _ _  _

Information:Play 2 Compiler: | '_ \| |/ _' | || |

Information:Play 2 Compiler: |  __/|_|\____|\__ /

Information:Play 2 Compiler: |_|            |__/

Information:Play 2 Compiler:

Information:Play 2 Compiler: [0mplay 2.2.2-RC4 built with Scala 2.10.3 (running Java 1.7.0_51), http://www.playframework.com

Information:Play 2 Compiler: [0m

Information:Play 2 Compiler: Use `play new` to create a new Play application in the current directory,

Information:Play 2 Compiler: or go to an existing application and launch the development console using `play`.

Information:Compilation completed successfully with 2 warnings in 3 sec

Information:0 errors

Information:2 warnings

Warning:Output path /workingdir/project/target/idea-classes intersects with a source root. Only files that were created by build will be cleaned.

Warning:Output path /workingdir/project/target/idea-test-classes intersects with a source root. Only files that were created by build will be cleaned.

Thanks,
Joachim

3 comments
Comment actions Permalink

It's possible with Play plugin. Play plugin uses "play test-compile" command for compilation (unlike Scala plugin, which uses own compiler).

Best regards,
Alexander Podkhalyuzin.

-1
Comment actions Permalink

I do have the play plugin installed.
So running the spec test should automatically call "play test-compile" in the background? Do I need to switch of the scala build server?

This doesn't seem to work.

Best regards,
Wallaby

1
Comment actions Permalink

I have got the same Issue.

0

Please sign in to leave a comment.