How to debug GwtTests

48 views
Skip to first unread message

imsandli

unread,
Nov 19, 2008, 11:29:57 AM11/19/08
to gwt-maven
Hello,
is there an easy way to debug your GWT-Tests?

With
mvn -Dmaven.surefire.debug="-Xdebug -
Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent
-Djava.compiler=NONE" test
i'm able to debug normal junit tests with eclipse, but the breakpoint
doesn't stop in GwtTest-Classes.

--
imsandli

Charlie Collins

unread,
Nov 19, 2008, 2:54:15 PM11/19/08
to gwt-maven
We don't have support for that, no, sorry.

We could add it as an enhancement, and make it work like our gwt:debug
goal (we do have gwt:debug, but not gwttest:debug) - but do you really
need to debug your tests? I guess they are a good mechanism to see
what's happening, but I typically debug just myself mucking around
with the running app, not the tests?

Arthur Kalmenson

unread,
Nov 19, 2008, 3:01:36 PM11/19/08
to gwt-...@googlegroups.com
I just debug my test cases from Eclipse. I run the test cases from
Eclipse, set the correct class path variables (add the source
folders), and viola.

Regards,
--
Arthur Kalmenson

Charlie Collins

unread,
Nov 19, 2008, 4:25:30 PM11/19/08
to gwt-maven
Good point Arthur, I was speaking of external processes, but you could
just do it in Eclipse - not sure GWT-Maven matters in that case, but
maybe. Are you using m2eclipse or something, or are you just setting
the test properties yourself manually in Eclipse?

On Nov 19, 3:01 pm, "Arthur Kalmenson" <arthur.k...@gmail.com> wrote:
> I just debug my test cases from Eclipse. I run the test cases from
> Eclipse, set the correct class path variables (add the source
> folders), and viola.
>
> Regards,
> --
> Arthur Kalmenson
>

Arthur Kalmenson

unread,
Nov 20, 2008, 9:36:30 AM11/20/08
to gwt-...@googlegroups.com
I set the test manually in Eclipse. What I essentially do is create a
GWTTestSuite and run it through Eclipse. This generates a Launch file,
but the test will fail because the source code is not included in the
class path. Stop or let the test fail. After you've done that, edit
the classpath in the Launch. Click Advanced -> Add Folders and then
add both java folders from test and main. Run again and viola! You
have Eclipse run your test cases and you can debug them.

Regards,
--
Arthur Kalmenson
Reply all
Reply to author
Forward
0 new messages