I've got the PageTester, and well as integration test (tapestry-test) functionality working with my web-app. Not too difficult but there were some hoops to jump through.
First of all, you may want to check out this thread: http://www.nabble.com/Junit-4-or-TestNG-5-suite-support-tf4647280s177.ht ml Maven's Surefire plug-in doesn't support suite functionality of either Junit 4 or TestNG 5. So if you want integration tests you may have to use something similar to the Ant script that I posted. I think Howard worked around this by posting all of his tests in one monolithic class (his AbstractIntegrationTestSuite class uses the @BeforeClass and @AfterClass annotations, not @BeforeSuite and @AfterSuite): http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/ test/java/org/apache/tapestry/integration/IntegrationTests.java?view=mar kup So I guess my advice would be to eliminate the Tapestry/PageTester from the equation altogether... Make sure Maven is able to find a basic simple test first. Another thread of mine that may be useful: http://www.nabble.com/Using-PageTester-with-tapestry-spring-tf4508561.ht ml Hope that helps, Joel -----Original Message----- From: Chris Lewis [mailto:[EMAIL PROTECTED] Sent: Friday, November 16, 2007 3:32 PM To: Tapestry users Subject: Re: T5: testing T5 Ok I retract part of that. I see this output in mvn test now: ------------------------------------------------------- T E S T S ------------------------------------------------------- Running net.godcode.t5c.integration.pagelevel.rendering.pages.TestSlideShow Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.024 sec Running net.godcode.t5c.integration.pagelevel.SlideShowTest Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.009 sec Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 It seems to run, but still says that 0 tests ran.... If I run from eclipse I get a different exception: FAILED: testEffects java.lang.NoClassDefFoundError: javax/servlet/ServletContext .. .. I want to get a test suite together, and among other things, test for JS errors (via selenium). If anyone can point out my errors I;d be very grateful. sincerely, chris Chris Lewis wrote: > I've started working on testing my components using the PageTester, > partially based on the site docs and partially on the T5 source. I > have a test method as follows, which mirrors how the FormTest in T5 > works: > > @Test > public void testEffects() { > String appPackage = > "net.godcode.t5c.integration.pagelevel.rendering"; > String appName = ""; > tester = new PageTester(appPackage, appName); > Document doc = tester.renderPage("TestSlideShow"); > } > > The page template for TestSlideShow uses my component like so: > > <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> > <body> > <div t:type="gc/slideshow" interval="3"> > <div>slide one</div> > <div>second one</div> > <div>third one</div> > </div> > </body> > </html> > > I have two issues. First, when run by mvn test, no test gets run. > Second, I am able to run it through eclipse using a TestNG run config, > but the test fails with an exception: > "org.apache.tapestry.ioc.internal.util.TapestryException: Unable to > resolve 'gc/slideshow' to a component class name." > > This test is part of the same project, but my fake app for testing > (net.godcode.t5c.integration.pagelevel.rendering) doesn't have an app > module to add the component lib to its component package list. > However, neither does the ones (....app2) used by T5! Can anyone point > out what I need to do? > > Thanks tons! > > Chris --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]