Rumen
Rumen

Reputation: 137

Run RobotFramework tests with Sikuli Library with Jenkins on VM (RDC)

I have automation tests based on RobotFramework with SikuliLibrary, which are for Image Compare. I'm using Jenkins to run on external server (VM) the tests. If I open the VM - image compare script works. The screenshot is created.

If I close the VM session and run the test, there is problem. Here is the log from keyword "Get Match Score":

INFO Could not find C:\Images\image.png INFO ${scoreFromImage} = 0.0

Is look like, when the VM session is not active (opened), "Get Match Score" cannot take a snapshot from the browser for comparing.

Is there any idea, how to fix this?

The Code:

Compare Process Diagram Image [Arguments] ${ImageName} ${ImageScore} ${scoreFromImage} = Get Match Score ${ImagesDirectory}${ImageName}.png ${scoreToString} = Convert To String ${scoreFromImage} ${scoreNumberPrecision} = Get Substring ${scoreToString} 0 6 Run Keyword If ${scoreNumberPrecision} == ${ImageScore} Log Successful ELSE Log Fail

Upvotes: 0

Views: 1309

Answers (2)

Rumen
Rumen

Reputation: 137

Solved:

The VM must be not closed by "X" button. The correct way: https://support.microsoft.com/en-us/kb/302801 I have .bat file, which contains tscon.exe %SESSIONNAME% /dest:console, after run - the VM is closed correctly. Also "Jenkins slave jar" must be running.

Upvotes: 1

Umesh
Umesh

Reputation: 121

Running Sikuli Test on VM is possible but need to keep session open. We cannot run Sikuli script on locked PC. When you close VM , it get locked and Test fail to run. Sikuli needs images for comparing and clicking, if session is locked there are no images so Test fail to run. So how we overcome this ? : https://support.smartbear.com/viewarticle/85926/

refer this URL for setting . By applying this you can run sikuli Test with minimized window of VM. (Still you cannot close WM window)

Upvotes: 0

Related Questions