2011/11/04 15:01, Markus Johnston:
> We very much would like to start writing view and controller tests.  I was
> wondering what other Tapestry users are doing, as far as testing is
> concerned.  What problems have you run into?  What tools or approaches have
> you found that work especially well?

We have a quite big application (>200k lines) and needed some
integration/acceptance end-to-end tests (as an addition to our unit tests).

Our first approach were TestNG tests based on Selenium 1.x and backend
calls in the same VM as the application itself. The pros are that you
can use the backend directly but you cannot test the app in the target
environment. Another problem is that the QA and our customer cannot
understand the TestNG specs. We also had big compatibility problems with
Selenium and browsers.

Our current tests are built on BDD with cuke4duke with Selenium 2.x web
driver. The tests run standalone and can be run against our QA or other
environments. We are porting our old tests when we're
changing/refactoring stuff.
Our experience with this stack:
cuke4duke is a Ruby port and not a 1st class JVM citizen, so you get
some problems. That's why we think about migrating to JBehave - but
that's no big deal because it works exactly the same. Selenium web
driver is very good and also works perfectly with IE and different
versions of Firefox. For acceptance tests and especially for UI tests
consider to organize your tests in layers (see
http://cuke4ninja.com/chp_three_layers.html).
We have a testhelper for making direct backend calls through Spring
remoting - but just for things you cannot do via UI.

A really good book about organizing your builds and tests (and
especially about automated testing) is Continuous Delivery from Jez
Humble and David Farley: http://amzn.to/qy2rc5

After all tries (and some failures) I'd advise this:
 * Use BDD if you need to communicate tests in any way, use JUnit/TestNG
otherwise
 * Layer your tests in workflows and technical stuff
 * Use Selenium 2.x web driver for UI tests
 * Write tests that run against any environment (your local started IDE
instance, your QA server - even your prod environment)

Hope this helps ...

-- 
Chris

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

Reply via email to