I finally achieved a goal this week that I have been wanting to do with this legacy project for a while.
The ability to run single junit test withing Eclipse that does everything needed to execute an end to end web based functional test.
Architecture is
1 Spring AbstractDependencyInjectionSpringContextTests.
2 Spring BeanFactory containing embedded Jetty config.
3 Jetty is configured to point at 'exploded' war structure in Eclipse project
4. web.xml uses Spring's ContextLoaderListener to startup main Spring app context.
5. Selenium RC (server and java client) is loaded after App by another child BeanFactory xml file
6. JUnit test now proceeds, with full Selenium and access to all Spring beans in application context.
I am going show config files for this in a later post.
Why the blog?
To record development problems and hopefully subsequent solutions when working on an ongoing Java project.
When I started on this project, it was already 5 years old. I thought it would be useful see how introducing some XP techniques might help reduce some unwanted artifacts
A test-driven re-write would be my preference, but as is so typical, this has been ruled out as too much work.
So, hopefully continuous gradual change in the right direction will help.
When I started on this project, it was already 5 years old. I thought it would be useful see how introducing some XP techniques might help reduce some unwanted artifacts
A test-driven re-write would be my preference, but as is so typical, this has been ruled out as too much work.
So, hopefully continuous gradual change in the right direction will help.
Saturday, July 12, 2008
Subscribe to:
Posts (Atom)