Upper level functional tests. But it is not a really good idea.

I believe view layer (templates) should be as simple as possible. All view
logic should be implemented in presenters (actions in struts). They are java
classes with out of HTTP or HTML dependencies and could be tested.
 
Action tells to view (written in jsp for example): "display user name" or
"hide cancel button".

There should not be logic in view. If there is no logic -- there is nothing
to test:)


Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
"Develop with pleasure!"

-----Original Message-----
From: Miguel [mailto:mig...@almeida.at] 
Sent: Friday, May 20, 2011 5:18 PM
To: Struts Users Mailing List
Subject: RE: S2 TEst Best Practices

On Fri, 2011-05-20 at 15:38 +0400, Ilya Kazakevich wrote:

> Hello,
> 
> In pure struts your action is just a presenter (see MVP pattern). So you
can
> test it using unit testing engines like testNG and jUnit.
> 
> For GUI testing you can use selenium.

Ilya, what kind of tests do you usually run with selenium? 

An interesting view on this from Gojko Adzic seems to almost suggest
these tests should be avoided: see in
http://gojko.net/2010/04/13/how-to-implement-ui-testing-without-shooting-you
rself-in-the-foot-2/




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to