1
votes

We are running Sikuli for GUI (image verification) testing.

We are running the scripts at Local and Jenkins level, where script is developed first using images grabbed from local machine and used to test on Jenkins.

The problem is the test cases are passing on the local machine level but consistently failing at the Jenkins level.

Here are some things that we have noted that could be causing this: Screen resolution between Jenkins and Local machine is different

  • Screen resolution and/or size is different from Jenkins and Local machine
    • Local machine resolution is 1920x1080x24
    • Jenkins machine resolution is set by xvfb 1920x1080x24
    • However the screen size on Jenkins machine when running the script is set at 1440x810
    • We have currently not found a way to adjust this screen size using Sikuli; any suggestions to change screen size using Sikuli or other tools would be great.
  • Browser version between Jenkins and Local machine is different
    • Jenkins is using firefox webdriver
    • Local machine is using firefox webdriver
    • We think of this as the issue bc the screenshot artifacts from the Jenkins machine is showing seemingly different font shapes to the eye; we say shapes bc obviously they are of the same font size, style, etc.
2

2 Answers

1
votes

You should ask such questions on Launchpad, the official Q&A board for SikuliX. I am RaiMan developer of SikuliX.

What version of Sikuli(X) are you using? Recommended 1.1.4.

SikuliX generally has no feature to set the screen resolution. This is given by the system environment.

If the image probes (captured images) contain text, then the search depends on how similar the fonts are in the image and the current screen. Differences usually lead to FindFailed.

Generally the size of the image probe in pixels must be the same on the current screen to be found.

http://sikulix.com

1
votes

Just want to answer my own question:

GUI (image/pixel) using Sikuli is dependent on the following factors:

  • Browser type
  • Screen resolution
  • Screen size
  • OS

These are outside the scope and not configurable within Sikuli (and also preset according to the tech stack used by the team) so it is best to align the development and test execution machine as much as possible.

The reason being the following formula is used when matching images, which is constrained to a grid.

enter image description here

Next option is to use the OCR capability of SikuliX.