Here is what I've found so far:

If I strip everything with @Inject (logger, other pages, etc) out of the page being tested (and out of any pages referenced by that page), I can get it to run. Is there something additional I need to do to make it work with pages that have @Inject in them?

Also it only seems to work when run from maven on the command line. When run using the TestNG plugin from within Eclipse i get: java.lang.NoSuchMethodError: org .apache.tapestry.ioc.internal.util.CollectionFactory.newStack(I)Lorg/ apache/tapestry/ioc/util/Stack;

Any suggestions or pointers in the right direction would be very appreciated.

Mark

On Feb 19, 2008, at 1:54 PM, Mark W. Shead wrote:

I am trying to use the PageTester functionality as described in:
http://tapestry.formos.com/nightly/tapestry5/tapestry-core/guide/unit-testing-pages.html


My test looks like:
        @Test
        public void testFrontPage() {
                String appPackage = "net.mydomain.package";
                String appName = "MyApp";                                       
                                              
                PageTester tester = new PageTester(appPackage, appName,
                                "src/main/webapp");
                Document doc = tester.renderPage("Start");
assertEquals(doc.getElementById("h1").getChildMarkup(), "Start Page");
        }

I get a ClassNotFoundException saying that it couldn't obtain the class file for net.mydomain.package.pages.Start

It is looking for the correct .class file and everything works up to the point where it tries to call renderPage("Start"). I get the same results when I run it under maven as I do when I run it using the TestNG plugin under Eclipse.

Is there a step I'm missing that will allow it to find the .class files? I am using 5.0.10.

Thanks.

Mark




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to