On 6/7/06, Wendy Smoak <[EMAIL PROTECTED]> wrote:
The Shale Blank app is now set up to run its integration tests. http://svn.apache.org/viewvc?rev=412639&view=rev The includes/excludes are working (thanks David!) and we're using the Cargo Java API to start and stop Tomcat. (Yesterday's experiment with the Cargo plugin didn't work out, the inherited config from the shale-apps parent pom was causing it to try to start Tomcat twice.) Surefire is bound to the 'test' phase by default, so it runs then with **/systest/** excluded. There is an additional execution of Surefire bound to the integration-test phase, where it runs only the integration tests. Craig, can you please try 'mvn install -Pmyfaces,itest' from shale-blank (or above) and let me know if this does what you want? (You'll either need 'cargo.tomcat5x.home' configured in settings.xml, or with -D on the command line.)
That works really slick ... thanks! This app has only one test so it doesn't matter too much, but usually
the code to start and stop the container goes in a TestSetup class. I put it directly in the test case to keep things as simple as possible at first.
I've seen that convention, but have a question for you ... since the unit tests for webapps built from these examples are going to use the mock objects in the Shale Test Framework anyway, what would you think of having a convenience abstract base class in shale-test (probably a subclass of AbstractHtmlUnitTestCase) that embedded the container startup/shutdown stuff? It would likely need some system properties to specify the container id (default to "tomcat5x") and the WAR to be tested, but this approach would save having to construct a customized TestSetup class in every webapp project. Craig Thanks,
-- Wendy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]