Click always timeout for Swing JButtonhttps://www.eclipse.org/forums/index.php/mv/msg/366751/893119/#msg_893119
I'm trying several testing frameworks for an open source application called Cytoscape, and seems Jubula is a good tool for our purpose (automate testing for a Swing application).

However, I have one critical issue and cannot test actual application.

Here is what I've done as a toy example:

1. Create a new test, and set up an AUT (specified cytoscape.sh script as its executable)
2. Connect to AUT agent. Cytoscape starts running.
3. Create a test suite
4. Create a test case by recording a single click (open a file JButton). Then stop recording.
5. Add the test case to the suite
6. Run the test.

Then, this very simple test always fails by timeout. This is weird because I can finish other simple test cases, like find a specific JButton or JTextField and make sure it's enabled, but somehow test case with button click always fails even if I set a long wait between steps. Do I misunderstand something or are there any alternative way to avoid this problem? Configuration is attached as a text file.

Thanks in advance.
Kei (Cytoscape Core Developer Team)]]>Keiichiro Ono2012-07-02T17:18:27-00:00Re: Click always timeout for Swing JButtonhttps://www.eclipse.org/forums/index.php/mv/msg/366751/893247/#msg_893247
My first thought is that it has something to do with focus behaviour. From the settings file you attached I saw you are working on a Mac. Macs are different from Windows and Linux, because the next application in line doesn't automatically get focus when the application before it is minimized. Have you tried making sure the AUT is in focus before trying the click? You ca try it manually (by clicking into the AUT when the test starts) and there is an action to do this automatically in the unbound modules. (You might want to have a go through the Cheat Sheets, which can be started from the help menu, to learn about writing tests with the unbound modules).

HTH,
Alex
]]>Alexandra Schladebeck2012-07-03T10:45:47-00:00Re: Click always timeout for Swing JButtonhttps://www.eclipse.org/forums/index.php/mv/msg/366751/893365/#msg_893365
I've just added one extra step to focus on the main application window at the beginning of the test suite, and now it works as expected. Seems all Swing apps on Mac need this step to make test suite running.