Menu

Problem adding to JTabbedPaneRecorderTest

Developers
2002-12-03
2002-12-05
  • Blake Christensen

    Sorry to bother you again :)

    I went back to the JTabbedPaneRecorderTest to try to reproduce the error that I have seen. I uncommented the testCaptureSelectionBug method, but when I run it I get the following:

    -----------------------
    Testsuite: abbot.editor.recorder.JTabbedPaneRecorderTest
    Tests run: 2, Failures: 1, Errors: 0, Time elapsed: 5.368 sec

    Testcase: testCaptureSelection took 3.024 sec
    Testcase: testCaptureSelectionBug took 2.314 sec
        FAILED
    No recorder instantiated (The generated event stream was the following:
    MOUSE_MOVED (20,20) on JTabbedPane instance
    MOUSE_PRESSED <BUTTON1_MASK> (20,20) on JTabbedPane instance
    HIERARCHY_CHANGED (!SHOWING) on 'This is pane #0' (JTabbedPaneRecorderTest$1/JLabel)
    HIERARCHY_CHANGED (SHOWING) on 'This is pane #5' (JTabbedPaneRecorderTest$1/JLabel)
    COMPONENT_HIDDEN on 'This is pane #0' (JTabbedPaneRecorderTest$1/JLabel)
    COMPONENT_SHOWN on 'This is pane #5' (JTabbedPaneRecorderTest$1/JLabel)
    Please report this bug at the following URL:
    http://sourceforge.net/tracker/?func=add&group_id=50939&atid=461490
    (include the stack trace and system information below)
              OS: Windows 2000 5.0 (x86)
    Java version: 1.4.0 (vm 1.4.0-b92)
       Classpath: H:\java\abbot-0.8.2\src;H:\java\abbot-0.8.2\lib\junit-3.7.jar;H:\java\abbot-0.8.2\lib\jdom-1.0b8.jar;H:\java\abbot-0.8.2\lib\xerces-130.jar;H:\java\abbot-0.8.2\lib\gnu-regexp-110.jar;H:\java\abbot-0.8.2\test;H:\java\abbot-0.8.2\classes;H:\ant\lib\junit.jar;H:\ant\lib\ant.jar;H:\ant\lib\optional.jar)
    junit.framework.AssertionFailedError: No recorder instantiated (The generated event stream was the following:
    MOUSE_MOVED (20,20) on JTabbedPane instance
    MOUSE_PRESSED <BUTTON1_MASK> (20,20) on JTabbedPane instance
    HIERARCHY_CHANGED (!SHOWING) on 'This is pane #0' (JTabbedPaneRecorderTest$1/JLabel)
    HIERARCHY_CHANGED (SHOWING) on 'This is pane #5' (JTabbedPaneRecorderTest$1/JLabel)
    COMPONENT_HIDDEN on 'This is pane #0' (JTabbedPaneRecorderTest$1/JLabel)
    COMPONENT_SHOWN on 'This is pane #5' (JTabbedPaneRecorderTest$1/JLabel)
    Please report this bug at the following URL:
    http://sourceforge.net/tracker/?func=add&group_id=50939&atid=461490
    (include the stack trace and system information below)
              OS: Windows 2000 5.0 (x86)
    Java version: 1.4.0 (vm 1.4.0-b92)
       Classpath: H:\java\abbot-0.8.2\src;H:\java\abbot-0.8.2\lib\junit-3.7.jar;H:\java\abbot-0.8.2\lib\jdom-1.0b8.jar;H:\java\abbot-0.8.2\lib\xerces-130.jar;H:\java\abbot-0.8.2\lib\gnu-regexp-110.jar;H:\java\abbot-0.8.2\test;H:\java\abbot-0.8.2\classes;H:\ant\lib\junit.jar;H:\ant\lib\ant.jar;H:\ant\lib\optional.jar)
        at abbot.editor.recorder.AbstractSemanticRecorderTest.assertStep(AbstractSemanticRecorderTest.java:132)
        at abbot.editor.recorder.JTabbedPaneRecorderTest.testCaptureSelectionBug(JTabbedPaneRecorderTest.java:66)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    Testcase: testCaptureSelectionBug

    ------------------------
    As always, I would appreciate any hints you can give me.
    Thanks.
    Blake

     
    • Timothy Wall

      Timothy Wall - 2002-12-05

      First, I'd suggest using the JTabbedPaneTester to perform the actions.  It's already been set up to generate the correct events (notice that the mouse release is missing from the above test).

      If you *do* use the robot-level events, be sure to match any button down with a button up, otherwise the recorder will not register the button click (if you pay close attention, a tabbed pane, or any button for that matter, does not fire until you release the mouse over the button).

       

Log in to post a comment.