1

I have some Jemmy DragnDrop junit tests. Below are some line of my code

Point p1 = SwingUtilities.convertPoint(portletOper.getUIComponent().getBasicComponent(), new Point(0, 0), displayOper.getUIComponent().getBasicComponent());
getTestRootContainerOperator().getWindow().getFocusOwner();
displayOper.getJemmyJComponentOperator().dragNDrop(p1.x + 10, p1.y + 10,
        p1.x + portletOper.getWidth() + 20, p1.y + portletOper.getHeight() / 4);

I run the test on local machine and it run perfectly.

The PROBLEM is:

I have a server (Windows server 2008) with Hudson installed. I create a hudson job to run the tests automatically.

The Drag n Drop test PASS : when I have a Remote Desktop connection to the server. (I can see the test run OK)

The Drag n Drop test FAIL : when there are no active sessions on the server.

Do you have any solution for this problem? Thank you PROs

Nghia Tran
  • 11
  • 1

1 Answers1

0

I do not know much about windows servers ...

What I know is you have to have a valid UI session running.

With no RDP session, can you invoke a UI program? Notepad, even? Can you invoke a Java program?

Shura
  • 175
  • 8
  • Thank you for your advice. My code invoke a Java program and test the Drag and Drop feature. Other actions like: Click, Type are all OK. But the DnD test is always FAIL if I don't connect to the server and watch it running. – Nghia Tran May 30 '13 at 01:01