Page MenuHomePhabricator

Add Sikuli to the machines that run browser tests
Closed, DeclinedPublic

Description

Sikuli ( http://www.sikuli.org ) is a tool for testing desktop interactions, such as mouse clicks and keyboard typing.

This tool is needed for testing typing in different languages, because the usual WebDriver tests are not able to generate proper keyboard events that completely emulate typing in advanced input methods for Japanese, Chinese and Indic scripts. We have many bugs in this area in the VisualEditor (e.g. Bug 52716), so we need proper regression testing.

This week I worked with Željko in the WMF office and we built a prototype test that uses Sikuli to test typing in Japanese:
https://gerrit.wikimedia.org/r/#/c/83966/

This works on Željko's laptop. The next step is to get it working on the virtual clients that run our continuous integration tests.

Thank you!


Version: wmf-deployment
Severity: enhancement

Details

Reference
bz54393

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:05 AM
bzimport set Reference to bz54393.
bzimport added a subscriber: Unknown Object (MLST).

Change 83966 had a related patch set uploaded by Zfilipin:
[WIP] [Browser test] Testing typing in VisualEditor

https://gerrit.wikimedia.org/r/83966

Good news: sikuli has been packaged for Debian/Ubuntu. There is a package libsikuli-script-java which seems to provide the needed material:

http://packages.ubuntu.com/precise/all/libsikuli-script-java/filelist

I have no clue how to launch the tests though. Maybe we just have to use /usr/bin/sikuli ?

Change 102141 had a related patch set uploaded by Hashar:
contint: install libsikuli-script-java for browser tests

https://gerrit.wikimedia.org/r/102141

I have deployed the package libsikuli-script-java on the integration-selenium-driver.pmtpa.wmflabs instance. The script is available as /usr/bin/sikuli

Could you craft a simple change that would attempt to run a single browser test using sikuli ?

Change 102141 merged by ArielGlenn:
contint: install libsikuli-script-java for browser tests

https://gerrit.wikimedia.org/r/102141

Amir, this patch was merged, can this be closed?

No, it is not really active yet.

After further investigation with Amir today, looks like Sikuli does not work with headless machines: "The system running Sikuli scripts or any apps using SikuliX features must have a real screen connected. So called headless systems are not supported (Java restriction)."

1: http://www.sikulix.com/quickstart.html

Resolving. See comment #9 for details. Please reopen if you think Sikuli is the way to go.

Change 83966 abandoned by Zfilipin:
[WIP] [BrowserTest] Testing typing in VisualEditor

Reason:
Sikuli is not the way to go. We will investigate another tool.

https://gerrit.wikimedia.org/r/83966

Change 165204 had a related patch set uploaded by Zfilipin:
contint: Sikuli is no longer used anywhere

https://gerrit.wikimedia.org/r/165204

Change 165204 merged by Dzahn:
contint: Sikuli is no longer used anywhere

https://gerrit.wikimedia.org/r/165204

Did anyone investigate using it headless with Xvfb? People have gotten this working with Linux and Jenkins (see for example https://answers.launchpad.net/sikuli/+question/248704#comment-1 ). Their setup differs, but it shows a fully automated headless installation can work.

@Mattflaschen the last time I have checked sikuli web page, it explicitly said running headless is not supported. Maybe something changed in the meantime.

@Mattflaschen the last time I have checked sikuli web page, it explicitly said running headless is not supported. Maybe something changed in the meantime.

I think it depends on how you define "headless". Sometimes it means "without anything related to Xorg whatsoever", but oftentimes it just means "without a normal X server installation and associated drivers" or "without a physical monitor/physical video card".

https://answers.launchpad.net/sikuli/+question/248704#comment-1 is quite clear that he got it working on Amazon Web Services (presumably Elastic Compute Cloud) and Jenkins. This is pretty similar to our setup, except we use OpenStack instead of AWS (of course there are other differences, but there doesn't seem to be any unsolvable issue).

xvfb (Jenkins plugin) is an established tool for this, so the Launchpad comment makes sense.