← Back to team overview

sikuli-driver team mailing list archive

[Bug 1007298] [NEW] Sikuli returned App.focus failed when integrate into hudson

 

Public bug reported:

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

** Affects: sikuli
     Importance: Undecided
         Status: New

-- 
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:
  Sikuli returned App.focus failed when integrate into hudson

Status in Sikuli:
  New

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


Follow ups

References