test folder not included in the Java Build Path Source

71 views
Skip to first unread message

Pion

unread,
Jan 5, 2010, 6:19:24 PM1/5/10
to Google Web Toolkit
I am using GWT 2.0 plugins on Eclipse Galileo.

After invoking the "New Application Project" and follow its
instructions, it created standard src, test, war, etc folders.

One thing I notice (even in GWT 1.x), the test folder is not included
in the Java Build Path Source.

I have to do the following:

o Right-click on my project name -> Build Path -> Configure Build
Path. Java Build Path dialog box shows up.
o Click on the "Java Build Path" on the left panel
o It only shows <MyProjectName>/src
o Click "Add Folder ..." button
o Select test folder

Is this supposed to be like this? Is it a bug? Is my environment
wrong? Am I doing something wrong?

Thanks in advance for your help.

Chris Ramsdale

unread,
Jan 6, 2010, 10:15:39 AM1/6/10
to google-we...@googlegroups.com
You're not doing anything wrong, this should work in a more automated fashion. Would you mind entering an issue?


- Chris

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




Thomas Broyer

unread,
Jan 6, 2010, 11:11:22 AM1/6/10
to Google Web Toolkit

On Jan 6, 4:15 pm, Chris Ramsdale <cramsd...@google.com> wrote:
> You're not doing anything wrong, this should work in a more automated
> fashion.

On the other hand, it shouldn't be included in the build path when you
hit "compile" or "run web application" because you usually:
- put tests in the same package as the class under test
- you generally don't <inherit name="com.google.gwt.junit.JUnit" />
because it's done automatically when running the tests
So having the tests including in the "compile" and "run" build path
would lead to loads of warnings about GWTTestCase's source code not
being available.

Is there a way for an Eclipse plug-in to mark a folder as a "tests
source" folder? (to distinguish it from a normal "source folder"; so
it could be easy to remove such folders from build path during compile/
run while still making it possible to customize your project layout
(vs. having "test" being hard-coded as an exclusion in compile/run)).

For instance, we do have 2 such "test folders", one for "plain java"
tests and the other for GWTTestCase tests. They're in the build path
and we just don't use the plug-in builtin's "compile" and "run"
facilities (well, we do use "run as web application" and "run as GWT
JUnit" kind of launches but we tweaked the classpath to remove the
offending folders)

Miguel Méndez

unread,
Jan 6, 2010, 11:23:51 AM1/6/10
to google-we...@googlegroups.com
On Wed, Jan 6, 2010 at 11:11 AM, Thomas Broyer <t.br...@gmail.com> wrote:


On Jan 6, 4:15 pm, Chris Ramsdale <cramsd...@google.com> wrote:
> You're not doing anything wrong, this should work in a more automated
> fashion.

On the other hand, it shouldn't be included in the build path when you
hit "compile" or "run web application" because you usually:
 - put tests in the same package as the class under test
 - you generally don't <inherit name="com.google.gwt.junit.JUnit" />
because it's done automatically when running the tests
So having the tests including in the "compile" and "run" build path
would lead to loads of warnings about GWTTestCase's source code not
being available.


This was the main motivation for not including the test source in the Run/Debug As Web App launch configurations.
 
Is there a way for an Eclipse plug-in to mark a folder as a "tests
source" folder? (to distinguish it from a normal "source folder"; so
it could be easy to remove such folders from build path during compile/
run while still making it possible to customize your project layout
(vs. having "test" being hard-coded as an exclusion in compile/run)).

For instance, we do have 2 such "test folders", one for "plain java"
tests and the other for GWTTestCase tests. They're in the build path
and we just don't use the plug-in builtin's "compile" and "run"
facilities (well, we do use "run as web application" and "run as GWT
JUnit" kind of launches but we tweaked the classpath to remove the
offending folders)


We have discussed adding the capability to mark folders as source or tests, etc., but have not added it yet.  I don't recall if there is an issue in the public issue tracker for this yet.
 
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.






--
Miguel

Pion

unread,
Jan 6, 2010, 12:20:58 PM1/6/10
to Google Web Toolkit
I just filed it as issue 4454

http://code.google.com/p/google-web-toolkit/issues/detail?id=4454

On Jan 6, 7:15 am, Chris Ramsdale <cramsd...@google.com> wrote:
> You're not doing anything wrong, this should work in a more automated
> fashion. Would you mind entering an issue?
>
> http://code.google.com/p/google-web-toolkit/issues/list
>
> - Chris
>

> On Tue, Jan 5, 2010 at 6:19 PM, Pion <onlee2...@gmail.com> wrote:
> > I am using GWT 2.0 plugins on Eclipse Galileo.
>
> > After invoking the "New Application Project" and follow its
> > instructions, it created standard src, test, war, etc folders.
>
> > One thing I notice (even in GWT 1.x), the test folder is not included
> > in the Java Build Path Source.
>
> > I have to do the following:
>
> > o Right-click on my project name -> Build Path -> Configure Build
> > Path. Java Build Path dialog box shows up.
> > o Click on the "Java Build Path" on the left panel
> > o It only shows <MyProjectName>/src
> > o Click "Add Folder ..." button
> > o Select test folder
>
> > Is this supposed to be like this? Is it a bug? Is my environment
> > wrong? Am I doing something wrong?
>
> > Thanks in advance for your help.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-we...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsu...@googlegroups.com>

Reply all
Reply to author
Forward
0 new messages