<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Enabling Test Driven Development in GWT client code</title>
	<atom:link href="http://blog.springsource.com/2008/02/19/enabling-test-driven-development-in-gwt-client-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.springsource.com/2008/02/19/enabling-test-driven-development-in-gwt-client-code/</link>
	<description>The voice of SpringSource</description>
	<lastBuildDate>Fri, 19 Mar 2010 05:36:47 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Testing GWT Applications &#124; Programmers Quotes &#124; SysProg</title>
		<link>http://blog.springsource.com/2008/02/19/enabling-test-driven-development-in-gwt-client-code/comment-page-1/#comment-151517</link>
		<dc:creator>Testing GWT Applications &#124; Programmers Quotes &#124; SysProg</dc:creator>
		<pubDate>Wed, 18 Mar 2009 00:55:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/main/2008/02/19/enabling-test-driven-development-in-gwt-client-code/#comment-151517</guid>
		<description>[...] Enabling Test Driven Development in GWT client code [...]</description>
		<content:encoded><![CDATA[<p>[...] Enabling Test Driven Development in GWT client code [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miles</title>
		<link>http://blog.springsource.com/2008/02/19/enabling-test-driven-development-in-gwt-client-code/comment-page-1/#comment-146036</link>
		<dc:creator>Miles</dc:creator>
		<pubDate>Wed, 11 Feb 2009 15:31:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/main/2008/02/19/enabling-test-driven-development-in-gwt-client-code/#comment-146036</guid>
		<description>I understand the problems with GWTTestCase but something is bothering me : if you don&#039;t use GWTTestCase, you test your client-side java code whereas this code will never be executed as such in your real application (instead, the generated javascript code is executed).
So you would write some unit tests in pure JUnit AND integration tests with GWTTestCase ?

By the way, Ext GWT provides a nice MVC framework for GWT.</description>
		<content:encoded><![CDATA[<p>I understand the problems with GWTTestCase but something is bothering me : if you don&#039;t use GWTTestCase, you test your client-side java code whereas this code will never be executed as such in your real application (instead, the generated javascript code is executed).<br />
So you would write some unit tests in pure JUnit AND integration tests with GWTTestCase ?</p>
<p>By the way, Ext GWT provides a nice MVC framework for GWT.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roald Bankras</title>
		<link>http://blog.springsource.com/2008/02/19/enabling-test-driven-development-in-gwt-client-code/comment-page-1/#comment-128506</link>
		<dc:creator>Roald Bankras</dc:creator>
		<pubDate>Fri, 14 Nov 2008 12:31:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/main/2008/02/19/enabling-test-driven-development-in-gwt-client-code/#comment-128506</guid>
		<description>For those interested, the original maven plugin has been released in the central maven repository.
net.bankras
mvn-gwt-plugin
1.0.4</description>
		<content:encoded><![CDATA[<p>For those interested, the original maven plugin has been released in the central maven repository.<br />
net.bankras<br />
mvn-gwt-plugin<br />
1.0.4</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Iwein Fuld</title>
		<link>http://blog.springsource.com/2008/02/19/enabling-test-driven-development-in-gwt-client-code/comment-page-1/#comment-125834</link>
		<dc:creator>Iwein Fuld</dc:creator>
		<pubDate>Tue, 21 Oct 2008 16:40:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/main/2008/02/19/enabling-test-driven-development-in-gwt-client-code/#comment-125834</guid>
		<description>I removed the link to the code. It is outdated. I still stand by my original advice though. If I have some time I will try to provide a more up to date version.</description>
		<content:encoded><![CDATA[<p>I removed the link to the code. It is outdated. I still stand by my original advice though. If I have some time I will try to provide a more up to date version.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kumar</title>
		<link>http://blog.springsource.com/2008/02/19/enabling-test-driven-development-in-gwt-client-code/comment-page-1/#comment-125786</link>
		<dc:creator>Kumar</dc:creator>
		<pubDate>Tue, 21 Oct 2008 10:21:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/main/2008/02/19/enabling-test-driven-development-in-gwt-client-code/#comment-125786</guid>
		<description>Possibly an interesting find ... I am working with GWT 1.5.2 and TWO tests fails in NoteEditorControllerTest. From what I have found, the Mock creation 

    private NoteServiceAsync noteServiceMock = createMock(NoteServiceAsync.class);

is invoking GWT.create() automagically and failing as GWT.create() can only be called from within a GWTTestCase. I tried extending the NoteEditorControllerTest from GWTTestCase with all the setup changes, but then all tests started failing - that could be a setup issue.

To cut a long story short, can someone please try this with GWT 1.5.2?


I also had to modify the POM slightly to include the windows-platform jars and libraries - Minor change mostly.

        
            com.google.gwt
            gwt-dev
            ${gwtVersion}
            ${platform}-libs
            zip
            provided
               
        
            com.google.gwt
            gwt-dev
            ${gwtVersion}
            ${platform}
            provided
        </description>
		<content:encoded><![CDATA[<p>Possibly an interesting find &#8230; I am working with GWT 1.5.2 and TWO tests fails in NoteEditorControllerTest. From what I have found, the Mock creation </p>
<p>    private NoteServiceAsync noteServiceMock = createMock(NoteServiceAsync.class);</p>
<p>is invoking GWT.create() automagically and failing as GWT.create() can only be called from within a GWTTestCase. I tried extending the NoteEditorControllerTest from GWTTestCase with all the setup changes, but then all tests started failing &#8211; that could be a setup issue.</p>
<p>To cut a long story short, can someone please try this with GWT 1.5.2?</p>
<p>I also had to modify the POM slightly to include the windows-platform jars and libraries &#8211; Minor change mostly.</p>
<p>            com.google.gwt<br />
            gwt-dev<br />
            ${gwtVersion}<br />
            ${platform}-libs<br />
            zip<br />
            provided</p>
<p>            com.google.gwt<br />
            gwt-dev<br />
            ${gwtVersion}<br />
            ${platform}<br />
            provided</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kumar</title>
		<link>http://blog.springsource.com/2008/02/19/enabling-test-driven-development-in-gwt-client-code/comment-page-1/#comment-125778</link>
		<dc:creator>Kumar</dc:creator>
		<pubDate>Tue, 21 Oct 2008 09:11:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/main/2008/02/19/enabling-test-driven-development-in-gwt-client-code/#comment-125778</guid>
		<description>Many thanks for this crucial advice. I was starting to plug GWT into my Spring/JPA applications and was getting concerned about the testing. It is important to break the habit of creating Entry Point classes and get into the habit of creating Controllers, especially when application is refactored into many UI modules.

You can possibly name the zip archive to mvc-demo.tgz.zip, so it can be uploaded. 
The &quot;tgz&quot; in the name will let folks know this is a &quot;tgz&quot; archive. You can possibly put an instruction to &quot;rename&quot; the archive.</description>
		<content:encoded><![CDATA[<p>Many thanks for this crucial advice. I was starting to plug GWT into my Spring/JPA applications and was getting concerned about the testing. It is important to break the habit of creating Entry Point classes and get into the habit of creating Controllers, especially when application is refactored into many UI modules.</p>
<p>You can possibly name the zip archive to mvc-demo.tgz.zip, so it can be uploaded.<br />
The &#034;tgz&#034; in the name will let folks know this is a &#034;tgz&#034; archive. You can possibly put an instruction to &#034;rename&#034; the archive.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Iwein Fuld</title>
		<link>http://blog.springsource.com/2008/02/19/enabling-test-driven-development-in-gwt-client-code/comment-page-1/#comment-121042</link>
		<dc:creator>Iwein Fuld</dc:creator>
		<pubDate>Sat, 13 Sep 2008 07:56:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/main/2008/02/19/enabling-test-driven-development-in-gwt-client-code/#comment-121042</guid>
		<description>First I should make clear that unit testing in any form is no replacement for (automated) acceptance testing.

The second thing is the &quot;logic in view&quot; point. I&#039;d aim to keep the logic in views to an absolute minimum. There can be multiple controllers that keep application state and UI state for example. As long as you don&#039;t put it in the view I do not have a very strong opinion on where the controller logic should go exactly. Arguably there is no guarantee that someController.hideSomeViewElement() actually hides the view if you haven&#039;t tested that, so that is where UI testing comes in.

If you&#039;re using mocks for the view elements (remember that you cannot mock the actual classes, so you have to extract an interface), you can make sure that the view altering methods are actually called, so you do not have to test every scenario. Also you can be confident that refactoring doesn&#039;t break the UI behavior even if you&#039;re not doing the acceptance test.

If you want more in depth examples you could go look for Rob van Maris&#039; blog. (see trackbacks)</description>
		<content:encoded><![CDATA[<p>First I should make clear that unit testing in any form is no replacement for (automated) acceptance testing.</p>
<p>The second thing is the &#034;logic in view&#034; point. I&#039;d aim to keep the logic in views to an absolute minimum. There can be multiple controllers that keep application state and UI state for example. As long as you don&#039;t put it in the view I do not have a very strong opinion on where the controller logic should go exactly. Arguably there is no guarantee that someController.hideSomeViewElement() actually hides the view if you haven&#039;t tested that, so that is where UI testing comes in.</p>
<p>If you&#039;re using mocks for the view elements (remember that you cannot mock the actual classes, so you have to extract an interface), you can make sure that the view altering methods are actually called, so you do not have to test every scenario. Also you can be confident that refactoring doesn&#039;t break the UI behavior even if you&#039;re not doing the acceptance test.</p>
<p>If you want more in depth examples you could go look for Rob van Maris&#039; blog. (see trackbacks)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stuart Ervine</title>
		<link>http://blog.springsource.com/2008/02/19/enabling-test-driven-development-in-gwt-client-code/comment-page-1/#comment-120787</link>
		<dc:creator>Stuart Ervine</dc:creator>
		<pubDate>Thu, 11 Sep 2008 06:35:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/main/2008/02/19/enabling-test-driven-development-in-gwt-client-code/#comment-120787</guid>
		<description>Good post, nice to see people test driving GWT. I agree testing logic using unit tests is a good idea, however I&#039;m not so sure about testing UI interactions using this style of unit test is all that useful. I believe you point this out above anyway (you mention you&#039;d rather check the registration happened correctly).

For example, imagine an application where a drop down dynamically hides some buttons. You could still fire events against those buttons, even though they don&#039;t appear on the screen - hence the unit test would still pass. If you use acceptance testing for the UI interactions (ie. via Selenium), the test would fail. 

My preference is to separate any logic that exists on the view into a separate class and unit test that. For example we&#039;ve recently coded a chart widget that used various coordinate systems and axis scales - all of which could be driven by unit tests. However the click interactions with the chart had to be driven by acceptance tests.

I&#039;d be interested to see how strong you find the tests over time as well - i.e. if you are refactoring the view/controller, how easy it is to deal with broken tests. 

Good to see other people trying new stuff with GWT though - and I&#039;ll try and keep up to date with your blog.</description>
		<content:encoded><![CDATA[<p>Good post, nice to see people test driving GWT. I agree testing logic using unit tests is a good idea, however I&#039;m not so sure about testing UI interactions using this style of unit test is all that useful. I believe you point this out above anyway (you mention you&#039;d rather check the registration happened correctly).</p>
<p>For example, imagine an application where a drop down dynamically hides some buttons. You could still fire events against those buttons, even though they don&#039;t appear on the screen &#8211; hence the unit test would still pass. If you use acceptance testing for the UI interactions (ie. via Selenium), the test would fail. </p>
<p>My preference is to separate any logic that exists on the view into a separate class and unit test that. For example we&#039;ve recently coded a chart widget that used various coordinate systems and axis scales &#8211; all of which could be driven by unit tests. However the click interactions with the chart had to be driven by acceptance tests.</p>
<p>I&#039;d be interested to see how strong you find the tests over time as well &#8211; i.e. if you are refactoring the view/controller, how easy it is to deal with broken tests. </p>
<p>Good to see other people trying new stuff with GWT though &#8211; and I&#039;ll try and keep up to date with your blog.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Iwein Fuld</title>
		<link>http://blog.springsource.com/2008/02/19/enabling-test-driven-development-in-gwt-client-code/comment-page-1/#comment-119824</link>
		<dc:creator>Iwein Fuld</dc:creator>
		<pubDate>Fri, 05 Sep 2008 07:30:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/main/2008/02/19/enabling-test-driven-development-in-gwt-client-code/#comment-119824</guid>
		<description>This is a problem that people traditionally solve with Dto&#039;s. With GWT 1.5 it is also possible to call non GWT json services (or any webservice for that matter), so in that way you could completely decouple client and server.

If you don&#039;t want to use a conversion layer to transform your domain objects to Dto&#039;s AND you don&#039;t want to completely decouple client from server. You&#039;re stuck with what you have now.

There are people arguing that orm annotations don&#039;t belong on your domain objects anyway, and the problem you&#039;re facing is an argument for that. On the other hand it can be very convenient, but then you can&#039;t use the same objects on the client cleanly.

The cleanest solution would be to completely split client and server, the most pragmatic (and ugly) one is to have the hibernate dependency on the client. Using xml instead of annotations is the middle ground. Let me know how it worked out for you, it&#039;d be interesting to hear your experiences.</description>
		<content:encoded><![CDATA[<p>This is a problem that people traditionally solve with Dto&#039;s. With GWT 1.5 it is also possible to call non GWT json services (or any webservice for that matter), so in that way you could completely decouple client and server.</p>
<p>If you don&#039;t want to use a conversion layer to transform your domain objects to Dto&#039;s AND you don&#039;t want to completely decouple client from server. You&#039;re stuck with what you have now.</p>
<p>There are people arguing that orm annotations don&#039;t belong on your domain objects anyway, and the problem you&#039;re facing is an argument for that. On the other hand it can be very convenient, but then you can&#039;t use the same objects on the client cleanly.</p>
<p>The cleanest solution would be to completely split client and server, the most pragmatic (and ugly) one is to have the hibernate dependency on the client. Using xml instead of annotations is the middle ground. Let me know how it worked out for you, it&#039;d be interesting to hear your experiences.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alline</title>
		<link>http://blog.springsource.com/2008/02/19/enabling-test-driven-development-in-gwt-client-code/comment-page-1/#comment-119733</link>
		<dc:creator>Alline</dc:creator>
		<pubDate>Thu, 04 Sep 2008 20:01:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/main/2008/02/19/enabling-test-driven-development-in-gwt-client-code/#comment-119733</guid>
		<description>Hi,
I wonder if you can help me with a MVC question that I have...
I am using GWT and I had to put my Model package inside the GWT client package.
The problem is that I am using Hibernate Anottations to persist my data, and the anottations stays inside the Model Classes.
So, I am forced to import Hibernate libraries inside to my client package.
I didn&#039;t like that...

Do you have a suggestion for a way that I can work together with hibernate anottations, MVC and GWT ?</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I wonder if you can help me with a MVC question that I have&#8230;<br />
I am using GWT and I had to put my Model package inside the GWT client package.<br />
The problem is that I am using Hibernate Anottations to persist my data, and the anottations stays inside the Model Classes.<br />
So, I am forced to import Hibernate libraries inside to my client package.<br />
I didn&#039;t like that&#8230;</p>
<p>Do you have a suggestion for a way that I can work together with hibernate anottations, MVC and GWT ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
