Test mode run/debug in IntelliJ IDEA

531 views
Skip to first unread message

Michał Drozdowicz

unread,
Feb 15, 2011, 6:38:32 PM2/15/11
to play-fr...@googlegroups.com
Hi!
Is it possible to setup the run configuration in IntelliJ IDEA so that Play! runs in test mode and I can reach the test runner? I've tried setting the VM parameters to:
-Dplay.id=test -Dapplication.path=<path to app> -Djavaagent=<path to play.jar> 

but it doesn't seem to work (missing route to @tests)

Any ideas?

Thanks,
Michał

cnLanxd

unread,
Feb 16, 2011, 3:08:53 AM2/16/11
to play-fr...@googlegroups.com
To enable the testrunner module, add this line to the conf/application.conf file

module.testruner=${play.path}/modules/testrunner
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

razjnev

unread,
Mar 18, 2011, 6:53:21 AM3/18/11
to play-framework
When I add the testrunner module I get the following compile error:
The file {module:testrunner}/app/controllers/TestRunner.java could not
be compiled. Error raised is : The type TestRunner is already defined

But if I don't include it I get "Not found" on the @tests route. I'm
setting -Dplay.id=test.

Any more ideas?

thanks,
Caroline

On Feb 16, 8:08 am, cnLanxd <cnla...@gmail.com> wrote:
> To enable the testrunner module, add this line to theconf/application.conffile
> module.testruner=${play.path}/modules/testrunner
> 于 2011/2/16 7:38, Michał Drozdowicz 写道:Hi!Is it possible to setup the run configuration in IntelliJIDEAso that Play! runs in test mode and I can reach the test runner? I've tried setting the VM parameters to:
> -Dplay.id=test -Dapplication.path=<path to app> -Djavaagent=<path to play.jar> 
>
>
>
> but it doesn't seem to work (missing route to @tests)
>
>
>
> Any ideas?
>
>
>
> Thanks,
>
> Michał
>
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email toplay-f...@googlegroups.com.
> To unsubscribe from this group, send email toplay-framewo...@googlegroups.com.

Steve Chaloner

unread,
Mar 18, 2011, 7:18:25 AM3/18/11
to play-framework
Testrunner is automatically imported when you run in test mode. You
should just be able to attach IntelliJ as a remote debugger when you
start play with "play test". If you're using "play auto-test" I think
a debugging port is not opened on the server.

When you start play, you should see something like Listening for
transport dt_socket at address: <debugging port> - if you don't,
that's why you can't attach.

I've found this is a better approach than running play in test mode
from within IntelliJ directly.

- Steve
Reply all
Reply to author
Forward
0 new messages