This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Jemmy/Jelly eat exception when occurs | ||
---|---|---|---|
Product: | qa | Reporter: | Marian Mirilovic <mmirilovic> |
Component: | Jellytools | Assignee: | issues@qa <issues> |
Status: | CLOSED WORKSFORME | ||
Severity: | blocker | ||
Priority: | P2 | ||
Version: | 4.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Marian Mirilovic
2004-06-13 15:43:06 UTC
Works for me. The following exception is thrown. What is your stack trace when the test fails? org.netbeans.jemmy.TimeoutExpiredException: Wait TopComponent with name=Projects index=0 subchooser=org.netbeans.modules.projects.ui.ProjectTab loaded at org.netbeans.jemmy.Waiter.waitAction(Waiter.java:140) at org.netbeans.jellytools.TopComponentOperator.waitTopComponent(TopComponentOperator.java:442) at org.netbeans.jellytools.ProjectsTabOperator.<init>(ProjectsTabOperator.java:54) Jirka, there is nested exception, but somebody catch TomeoutExceptions and throw *fail* instead. Use case: - I try to invoke poppu menu -> popup menu doesn't come - so I encapsulate this code to try/catch block -> It doesn't work, because there is no exception !!! log: -------------- org.netbeans.junit.AssertionFailedErrorException: Popup menu at org.netbeans.jellytools.JellyTestCase.runBare(JellyTestCase.java:139) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at org.netbeans.junit.NbTestCase.run(NbTestCase.java:119) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.netbeans.xtest.testrunner.JUnitTestRunner.runTests(JUnitTestRunner.java:173) at org.netbeans.xtest.testrunner.JUnitTestRunner.runTests(JUnitTestRunner.java:129) at org.netbeans.xtest.plugin.ide.MainWithExec.run(MainWithExec.java:187) at org.netbeans.xtest.plugin.ide.Main$2.run(Main.java:320) at java.lang.Thread.run(Thread.java:595) Nested Exception is: org.netbeans.jemmy.TimeoutExpiredException: Popup menu at org.netbeans.jemmy.Waiter.waitAction(Waiter.java:140) at org.netbeans.jemmy.WindowWaiter.waitWindow(WindowWaiter.java:405) at org.netbeans.jemmy.WindowWaiter.waitWindow(WindowWaiter.java:195) at org.netbeans.jemmy.WindowWaiter.waitWindow(WindowWaiter.java:213) at org.netbeans.jemmy.operators.JPopupMenuOperator.waitJPopupWindow(JPopupMenuOperator.java:223) at org.netbeans.jemmy.operators.JPopupMenuOperator.callPopup(JPopupMenuOperator.java:297) at org.netbeans.jemmy.operators.JPopupMenuOperator.callPopup(JPopupMenuOperator.java:337) at org.netbeans.jemmy.operators.JPopupMenuOperator.callPopup(JPopupMenuOperator.java:350) at org.netbeans.jellytools.TopComponentOperator.pushMenuOnTab(TopComponentOperator.java:460) at org.netbeans.jellytools.actions.MaximizeWindowAction.performPopup(MaximizeWindowAction.java:72) at org.netbeans.jellytools.actions.MaximizeWindowAction.performPopup(MaximizeWindowAction.java:60) at org.netbeans.jellytools.actions.Action.perform(Action.java:200) at org.netbeans.jellytools.actions.Action.perform(Action.java:251) at org.netbeans.jellytools.TopComponentOperator.maximize(TopComponentOperator.java:205) at gui.action.ExpandNodesProjectsView.initialize(ExpandNodesProjectsView.java:126) at testUtilities.PerformanceTestCase.measureTime(Unknown Source) at testUtilities.PerformanceTestCase.doMeasurement(Unknown Source) at gui.action.ExpandNodesProjectsView.testExpandProjectNode(ExpandNodesProjectsView.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:495) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at org.netbeans.jellytools.JellyTestCase.runBare(JellyTestCase.java:112) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at org.netbeans.junit.NbTestCase.run(NbTestCase.java:119) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.netbeans.xtest.testrunner.JUnitTestRunner.runTests(JUnitTestRunner.java:173) at org.netbeans.xtest.testrunner.JUnitTestRunner.runTests(JUnitTestRunner.java:129) at org.netbeans.xtest.plugin.ide.MainWithExec.run(MainWithExec.java:187) at org.netbeans.xtest.plugin.ide.Main$2.run(Main.java:320) at java.lang.Thread.run(Thread.java:595) Well, I've looked at JellyTestCase calss and found root of all my troubles with Jelly/Jemmy eating exceptions.... at line 137 ... ------------ if (th instanceof JemmyException) { // all instancies of JemmyException are re-throwed as AssertionError (test failed) throw new AssertionFailedErrorException(th.getMessage(), th); ---------------- So, Do you nkow about any reasons why "all instancies of JemmyException are re-throwed as AssertionError (test failed)" ? I dont' think it's up to JellyTestCase do thinkgs like this, there is no way for test developers (their used JellyTestCase) for recovery testcase after TimeOutExpiredException ! ... Jirka, do you plan to do something with this? If no, I'll start to use own TestCase class ...., just let me know, it's high priority issue for performance testing, because if I catch some problem on one test case, I must have a way to recover IDE, now it isn't possible ... Works for me. Exception is processed in JellyTestCase only if it is not caught in test case. ;( Jirka is right, I am so sorry, once more I am so sorry . Thanks a lot ..... ;) |