← Back to team overview

sikuli-driver team mailing list archive

[Bug 1007298] Re: Java: Hudson: App.focus fails on remote system

 

Thanks for quickly repsonse.
I used the version Sikuli X-1.0rc3 r930/r905
The case is if I integrate the test scripts into hudson, and set local machine as a test node, the scripts above with sikuliScript.switchApp("google chrome") can work perfect. In the other hand, if I set remote machine as a test node, the scripts is failed.
I guess there was no problem with scripts coding, as the only change is the test machine. Maybe something wrong with SIKULI configuration or any others. I have not idea about it right now.

Thanks,
xlzdew

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1007298

Title:
  Java: Hudson: App.focus fails on remote system

Status in Sikuli:
  Opinion

Bug description:
  I need to execute selenium & sikuli (java)test case in remote machine,
  so I create an hudson job and configured a slave node for it. But
  SIKULI  returned App.focus failed when I run it slave node. While it
  works fine if I let hudson execute the test case in local machine.
  Confused about it , does someone have any idea about it?

  // test case example:
  public void setUp(String url) throws Exception {
  		selenium = new DefaultSelenium("localhost", 4444, "*googlechrome", url);
  		selenium.start("captureNetworkTraffic=true");
  		selenium.setSpeed("3000");
  		selenium.windowMaximize();
  		screen = new Screen();
  		sikuliScript = new SikuliScript();
  		sikuliScript.switchApp("google chrome");

                  selenium.open("http://www.google.com";);

                  screen.wait("c:\temp\test.png", 1000);

  }

  
  it returns following error logs in hudson.
     [testng] [info] Windows utilities loaded.
     [testng] [log] App.focusgoogle chrome(0) #0
     [testng] [error] App.focus failed: google chrome not found
     [testng] ===============================================
     [testng] Suite
     [testng] Total tests run: 1, Failures: 1, Skips: 0
     [testng] ===============================================
     [testng] 
     [testng] The tests failed.

  
  if I changed the sikuliScript.switchApp("google chrome") to sikuliScript.switchApp("C:\\Documents and Settings\\XPMUser\\Local Settings\\Application Data\\Google\\Chrome\\Application\\chrome.exe")

  it will return following logs:
  [testng] [info] Windows utilities loaded.
  [testng] [log] App.focus C:\Documents and Settings\XPMUser\Local Settings\Application Data\Google\Chrome\Application\chrome.exe(0) #0
  [testng] ===============================================
  [testng] Suite
  [testng] Total tests run: 1, Failures: 1, Skips: 0
  [testng] ===============================================
  [testng] 
  [testng] The tests failed.

  no [error] message returned, but the build still failed soon.

  It seems screen.wait("c:\temp\test.png", 1000); is failed when execute
  in slave node, don't know why. Can someone help me?

  Thanks in advance,
  xlzdew

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1007298/+subscriptions


References