GUI Tests don't work on TeamCity Agent

We’re using TeamCity Professional Version 4.5.1 (build 8975) for running automated unit tests. We have a same group of automated GUI tests that runs in our Linux Machine fine, but fails in our Windows machine all the time.  If we run the tests locally using ant from the same Windows machine it works.

The configuration that we use;

-          Ant Version: apache-ant-1.7.1

-          Java JDK Version: jdk1.6.0_14

-          Windows Machine Specs: Windows Server 2003, 2gb Ram, NVIDIA FX Quadro 1400 Graphics card,

-          Linux Machine Specs: Ubuntu, hardware is the same as Windows machine

Is there any difference running graphical junit tests between from local machine using ant and running through TeamCity agent?  We couldn't figure out why it wouldn't work on Windows machine.

Thanks in advance for any assistance,

Eray

Ps: An example of a failed test is as follows;

public void testDeclutteredApp6AIconsSingleClick() {

            System.out.println("DeclutteredApp6AIconsSingleClick");

            canvas.display(drawable);

            canvas.display(drawable);

            

            double[] aLatLon = canvas.screenToLatLon(200, 200);

            Vector<IGISGraphicIcon> graphics = new Vector<IGISGraphicIcon>();

            for(int i=0;i<10;i++)

            {

                  IGISGraphicIcon icon = createApp6Icon(aLatLon);

                  canvas.add(icon);

                  graphics.add(icon);

            }

            canvas.display(drawable);

            canvas.display(drawable);

            ((GLDeclutterController)canvas.getController().getDeclutterController()).mousePressed(meCtrl(200,200));

            ((GLDeclutterController)canvas.getController().getDeclutterController()).mouseReleased(meCtrl(200,200));

            canvas.display(drawable);

            canvas.display(drawable);

            

            int declutteredCount = 0;

            for(int i=0;i<graphics.size();i++)

            {

                  if(graphics.elementAt(i).getDeclutterDisplacement()[0]!=0||graphics.elementAt(i).getDeclutterDisplacement()[1]!=0)

                  {

                        declutteredCount++;

                  }

            }

            assertEquals(declutteredCount, 9);

            for(int i=0;i<graphics.size();i++)

            {

                  canvas.remove(graphics.elementAt(i));

            }

            canvas.display(drawable);

            canvas.display(drawable);

      }

0
1 comment

If agent is installed as service then there indeed can be some difference. Please check that your service is NOT working under the local system account (see Log on tab). If it does, try to specify other user account.

0

Please sign in to leave a comment.