You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by akiindia01 <at...@gmail.com> on 2012/02/08 07:37:07 UTC
how to test the wicket panel
Hi,
I am new to wicket and got to do junit testing job.
I am using wicket tester to start the panel.
I have pagination button on my panel and i have to check the onclick
functionality for this button.
the panel has no form.
I am using following signature to check it.
tester.clickLink("panel:paginationContainer:paginationFirst");
this is throwing error :
path "panel:paginationContainer:paginationFirst" does not exist for page
please tell me how to access the paginationfirst button in the testpanel
regards,
aki
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-test-the-wicket-panel-tp4368407p4368407.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: how to test the wicket panel
Posted by Alec Swan <al...@gmail.com>.
I do something like:
wicketTester.startPanel(new ITestPanelSource() {
public Panel getTestPanel(String panelId) { return MyPanel(); }
});
tester.getComponentFromLastRenderedPage(DummyPanelPage.TEST_PANEL_ID);
If this doesn't work for you send us your code.
Thanks,
Alec
On Mon, Feb 13, 2012 at 5:05 AM, akiindia01 <at...@gmail.com> wrote:
> i am getting the follwing error :eachtime i tried to start the panel please
> help me. tell me how to start the panel.
>
>
> org.apache.wicket.WicketRuntimeException: path: 'panel' does not exist for
> page: UnexpectedExceptionPage
> at
> org.apache.wicket.util.tester.BaseWicketTester.fail(BaseWicketTester.java:1449)
> at
> org.apache.wicket.util.tester.BaseWicketTester.getComponentFromLastRenderedPage(BaseWicketTester.java:487)
> at
> org.apache.wicket.util.tester.BaseWicketTester.isComponent(BaseWicketTester.java:570)
> at
> org.apache.wicket.util.tester.WicketTester.assertComponent(WicketTester.java:355)
> at
> com.fifththird.retail.fna.pages.components.PoaPodCustomerSearchPanelTest.testDefaultPanelRender(PoaPodCustomerSearchPanelTest.java:51)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:615)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at org.jmock.core.VerifyingTestCase.runBare(VerifyingTestCase.java:39)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:232)
> at junit.framework.TestSuite.run(TestSuite.java:227)
> at
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-test-the-wicket-panel-tp4368407p4383536.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: how to test the wicket panel
Posted by akiindia01 <at...@gmail.com>.
i am getting the follwing error :eachtime i tried to start the panel please
help me. tell me how to start the panel.
org.apache.wicket.WicketRuntimeException: path: 'panel' does not exist for
page: UnexpectedExceptionPage
at
org.apache.wicket.util.tester.BaseWicketTester.fail(BaseWicketTester.java:1449)
at
org.apache.wicket.util.tester.BaseWicketTester.getComponentFromLastRenderedPage(BaseWicketTester.java:487)
at
org.apache.wicket.util.tester.BaseWicketTester.isComponent(BaseWicketTester.java:570)
at
org.apache.wicket.util.tester.WicketTester.assertComponent(WicketTester.java:355)
at
com.fifththird.retail.fna.pages.components.PoaPodCustomerSearchPanelTest.testDefaultPanelRender(PoaPodCustomerSearchPanelTest.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at junit.framework.TestCase.runTest(TestCase.java:168)
at org.jmock.core.VerifyingTestCase.runBare(VerifyingTestCase.java:39)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-test-the-wicket-panel-tp4368407p4383536.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: how to test the wicket panel
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
On Wed, Feb 8, 2012 at 8:37 AM, akiindia01 <at...@gmail.com> wrote:
> Hi,
> I am new to wicket and got to do junit testing job.
>
> I am using wicket tester to start the panel.
>
> I have pagination button on my panel and i have to check the onclick
> functionality for this button.
> the panel has no form.
>
> I am using following signature to check it.
> tester.clickLink("panel:paginationContainer:paginationFirst");
I don't know the structure of your panel but I guess you need to
remove "panel:" prefix.
>
> this is throwing error :
>
> path "panel:paginationContainer:paginationFirst" does not exist for page
>
> please tell me how to access the paginationfirst button in the testpanel
>
> regards,
> aki
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-test-the-wicket-panel-tp4368407p4368407.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org