Any plans to improve unit testing abilities so that we might be able to do
more unittesting without using GWTTestCase ?

I've been trying out gwtmockito as an alternative and it is great, but for
unit testing widgets it has many limitations.

Sure I am using MVP for the main application logic. But custom widgets are
hard to implement and even harder to test the way it currently is.

I think with a little help of GWT changes that maybe it could become easier
to inject mocks in the right place instead of using class rewriting and
other nasty tricks like gwtmockito is doing.

For many things having some server side fake for GWT.create would already
help a lot (for things like CssResources or Messages it is rather easy to
just use some dynamic proxy to fake what you normally generate for the
client. Maybe some basic working DOM class would be great as wel, because
then most widgets could just be created without much problems.

Only the JSNI stuff remains a problem, but maybe if the great ideas of
JsInterop and such might make if feasible to even find a solution there ?
Or at least putting them in a separate class and using an interface in the
widgets to make them mockable for test purposes would be great.

One thing that would make GWT a lot easier to mock for testing purpose is
if it would embrace an injection framework like GIN or as done in JBoss
Errai. You can basically get rid of all the GWT.create invocations and
start using @Inject so that we can replace them with either a generated
class or a mocked class.

David



On Fri, Apr 11, 2014 at 8:08 PM, Goktug Gokdogan <[email protected]> wrote:

> Emma (which is already broken for some cases) is going to go away with dev
> mode. We have been talking about js based alternative but I'm not sure when
> that will be ready.
>
>
> On Fri, Apr 11, 2014 at 6:44 AM, David <[email protected]> wrote:
>
>> No feedback from the GWT developers ?
>>
>>
>> On Mon, Apr 7, 2014 at 3:09 PM, stuckagain <[email protected]> wrote:
>>
>>> What is the state for supporting Emma with GWTTestCase ?
>>>
>>> I see that the documentation still refers to a very old version of Emma
>>> (and EclEmma).
>>> How can we use JaCoCo to do automated testing with code coverage with
>>> GWT TestCase ?
>>>
>>> What will happen when moving to Java 8 ? I guess that the old Emma as
>>> referred to in the documentation will have a problem with this (does it
>>> even support full Java 7 syntax ?)
>>>
>>> Will GWTTestCase support remain once DevMode goes away ? or do I
>>> understand that wrongly ?
>>>
>>>
>>>
>>>
>>>
>>> --
>>> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "GWT Contributors" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected]
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "GWT Contributors" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
> ---
> You received this message because you are subscribed to the Google Groups
> "GWT Contributors" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to