runnig costello in TC

I tryed to run Abbot-tests, wich are created with costello, in TC.
But they fail with the same error massage: Clicking on 'start' never produced a popup menu.
To click on start button is everytime the first action on the test. But in breaks on this line.
I got some junit tests without using the GUI, they all work right.
Is it possible that team city can't simulate the GUI becouse its a system tread and don't realy creates a clickable GUI?
Or is it possible to start the GUI not hidden? so that the tests work on screen and not in system only?

THX


abbot.tester.ComponentMissingException: Clicking on 'start' never produced a popup menu
at abbot.tester.Robot.selectMenuItem(Robot.java:1460)
at abbot.tester.Robot.selectMenuItem(Robot.java:1416)
at abbot.tester.ComponentTester.actionSelectMenuItem(ComponentTester.java:517)
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:585)
at abbot.script.Call.invoke(Call.java:194)
at abbot.script.Call.runStep(Call.java:129)
at abbot.script.Step.run(Step.java:103)
at abbot.script.StepRunner.runStep(StepRunner.java:277)
at abbot.script.Sequence.runStep(Sequence.java:110)
at abbot.script.StepRunner.runStep(StepRunner.java:274)
at abbot.script.Sequence.runStep(Sequence.java:110)
at abbot.script.Script.runStep(Script.java:548)
at abbot.script.StepRunner.runStep(StepRunner.java:274)
at abbot.script.StepRunner.run(StepRunner.java:194)
at junit.extensions.abbot.ScriptFixture.runTest(ScriptFixture.java:61)
at de.sbs.forumstar.client.straf.bayern.schoeffen.guitest.DefaultGuiTestCase.runTest(DefaultGuiTestCase.java:20)
at junit.framework.TestCase.runBare(TestCase.java:127)
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 junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:289)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:656)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:558)

Edited by: patrick_py on Oct 14, 2008 2:41 PM

3 comments
Comment actions Permalink

Here is what I found when setting up our GUI testing (on Windows build agents):
GUI applications cannot interact with the console when the build agent runs as a windows service. This is because there is no GUI session associated with the service's context. The easiest thing I could recommend is to have a user with the necessary permissions to run the build agent always logged on and run the agent in console mode.

The agent can be started in console mode with the command:
$AGENT_HOME\bin\agent.bat start
And can be stopped using:
$AGENT_HOME\bin\agent.bat stop

Hopefully this should do the trick.
enjoy, ray

0
Comment actions Permalink

It works with this that way startet agent!

Thank you very much for your help!

0
Comment actions Permalink

There is also an 'AWT'-Mode for abbot, where abbot just simulates events instead of trying to actually click on the desktop. This way abbot can also run as a service, if you don't like the desktop mode.
(This is also quite nice, if you locally run your tests, because your mouse is not moving all the time anymore)

You might also want to disable DirectDraw as there is a bug in Java, which keeps references to windows handles, which - after a lot of builds might make your GUI-test fail as well.

We successfully run a lot of abbot-integration-tests with the following settings:

<junit fork="yes" timeout="300000" dir="$" maxmemory="500m">
]]>

By the way: the 'treelock_wait' also helps if you build server is a bit slow ... abbot has internal timeouts and if they trigger to fast, the you will get those 'never produces a popup-menu' some times.

Only as we moved to SWT some time ago, we had to switch to the desktop-mode as well, because in SWT events can't be simulated by abbot :( ...

0

Please sign in to leave a comment.