You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "ross.efi" <ro...@att.net> on 2010/04/05 17:54:49 UTC

Unit testing with tapestry 5.1 and spring

I'm surprised at the lack of information about how to get the page tester
wired up correctly in tapestry 5.1 to use spring beans.  It looks like the
API for the the SpringModuleDef changed between 5.0 and 5.1 for connecting
the page tester to the spring context.

Testing a Tapestry application outside of a container using JUnit (or
TestNG) is prerequisite for new development.  Simply saying "use Selenium"
is not acceptable.

I've worked on teams that have used Tap 3, 4.0, and 4.1, and have started to
build new apps using 5.1, but this is a show-stopper for me.

I'm disappointed because I think Tapestry is the best solution out there
right now.
-- 
View this message in context: http://old.nabble.com/Unit-testing-with-tapestry-5.1-and-spring-tp28141440p28141440.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: Unit testing with tapestry 5.1 and spring

Posted by Paul Field <pa...@db.com>.
> I'm looking at the Testify framework, and while it looks promising, it 
still
> doesn't connect up the spring layer.
> 
> It also puts a /foo in front of every asset and page link on my page. 
> Frustrating....

The "/foo" is a default context that Tapestry adds when using its testing 
features. It looks annoying but it is kind-of useful because it makes sure 
you are testing with a context value and helps avoid your features working 
when there is no context and then breaking when there is one (only likely 
to happen for low-level URL mangling features though).

I have looked at connecting the Spring layer into tests and it is quite 
hard to do. The tapestry-spring integration doesn't provide hooks that 
allow it to work outside a web container - it could do with some 
refactoring to allow this :-)

In case it helps, here's what my projects are doing: we do acceptance 
testing using Fitnesse with a full Spring container and the tests start 
just below the web UI. Then we unit test Tapestry components with Testify 
and integration test the whole lot with a small number of Selenium tests. 
We also use Selenium for any rich UIs with Ajax or Javascript.

Paul






---

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.

Re: Unit testing with tapestry 5.1 and spring

Posted by "ross.efi" <ro...@att.net>.
I'm looking at the Testify framework, and while it looks promising, it still
doesn't connect up the spring layer.

It also puts a /foo in front of every asset and page link on my page. 
Frustrating....

-- 
View this message in context: http://old.nabble.com/Unit-testing-with-tapestry-5.1-and-spring-tp28141440p28145214.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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