You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Lukasz Lenart <lu...@apache.org> on 2012/09/04 15:44:16 UTC
Re: Examples app
2012/7/24 Rene Gielen <rg...@apache.org>:
> Unless someone has the time to give the showcase application a full
> redesign, having small focused examples around sounds reasonable to me.
> Martin's valid concerns about quality assurance should indeed be well
> addressed by having Selenium or WebDriver tests around - which would be
> a good demonstration by itself on how to develop robust web
> applications. We could easily establish a "no release without
> integration / automated acceptance tests" policy for such example projects.
I thought about using Selenium, but I found JWebUnit [1], which
basically wraps Selenium and HtmlUnit. WDYT?
http://jwebunit.sourceforge.net/
Kind regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Examples app
Posted by Lukasz Lenart <lu...@apache.org>.
2012/9/4 Dave Newton <da...@gmail.com>:
> I think the coolest would be to have some BDD in there, like with easyb/etc.
I have no experiences with BDD/easyb, some example ?
> It can drive JWebUnit (IIRC, or HtmlUnit), can be run from Maven, and is
> easy to write.
Yeah, no needs to run a web browser and so on, but that's wrong :/
Anyway, I was able to add a simple integration test to Blank Webapp,
it looks like below, WDYT? Is it the right direction ?
public class HelloWorldIntegrationTest {
public static final int PORT = 8090;
@Before
public void setUp() throws Exception {
Server server = new Server(PORT);
WebAppContext handler = new WebAppContext("src/main/webapp",
"/struts2-blank");
server.setHandler(handler);
server.start();
JWebUnit.setBaseUrl("http://localhost:" + PORT + "/struts2-blank/");
}
@Test
public void testIndex() throws Exception {
// when
JWebUnit.beginAt("index.action");
// then
JWebUnit.assertResponseCode(200);
JWebUnit.assertTitleEquals("Struts is up and running ...");
JWebUnit.assertLinkPresentWithExactText("English");
JWebUnit.assertLinkPresentWithExactText("Espanol");
}
}
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Examples app
Posted by Dave Newton <da...@gmail.com>.
I think the coolest would be to have some BDD in there, like with easyb/etc.
It can drive JWebUnit (IIRC, or HtmlUnit), can be run from Maven, and is
easy to write.
Dave
On Tue, Sep 4, 2012 at 9:44 AM, Lukasz Lenart <lu...@apache.org>wrote:
> 2012/7/24 Rene Gielen <rg...@apache.org>:
> > Unless someone has the time to give the showcase application a full
> > redesign, having small focused examples around sounds reasonable to me.
> > Martin's valid concerns about quality assurance should indeed be well
> > addressed by having Selenium or WebDriver tests around - which would be
> > a good demonstration by itself on how to develop robust web
> > applications. We could easily establish a "no release without
> > integration / automated acceptance tests" policy for such example
> projects.
>
> I thought about using Selenium, but I found JWebUnit [1], which
> basically wraps Selenium and HtmlUnit. WDYT?
>
> http://jwebunit.sourceforge.net/
>
>
> Kind regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
--
e: davelnewton@gmail.com
m: 908-380-8699
s: davelnewton_skype
t: @dave_newton <https://twitter.com/dave_newton>
b: Bucky Bits <http://buckybits.blogspot.com/>
g: davelnewton <https://github.com/davelnewton>
so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>